Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > find2perl

Reply
Thread Tools

find2perl

 
 
Ed Doyle
Guest
Posts: n/a
 
      12-28-2005
Hi,
I am new to perl. Seems to me the following should work, but it does not

print("Hello World!\n\n");
find2perl . -name dsc00970.jpg -print;

When I run it I get the following:

[ed@localhost Flame]$ perl junk1.pl
Hello World!

Can't locate object method "name" via package "dsc00970"
(perhaps you forgot to load "dsc00970"?) at junk1.pl line 4.

Anyone have any idea what I am doing wrong?

Thanks

Ed
 
Reply With Quote
 
 
 
 
Joe Smith
Guest
Posts: n/a
 
      12-29-2005
Ed Doyle wrote:
> Hi,
> I am new to perl. Seems to me the following should work, but it does not
>
> print("Hello World!\n\n");
> find2perl . -name dsc00970.jpg -print;


No, that's not how you use it. That utility is supposed to be
invoked from the command line, not from inside a perl script.

#!/bin/sh
echo "Creating a perl script from a 'find' command"
find2perl . -name dsc00970.jpg -print > findit.pl
perl findit.pl

-Joe
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
differences between find2perl and find GU Perl Misc 4 08-31-2009 08:38 PM
find2perl and File::Find examples Sunil Perl Misc 3 11-28-2003 11:19 PM
help with find2perl Sunil Perl Misc 3 11-25-2003 12:31 PM



Advertisments