Re: What's wrong with this program?
From: Uri Guttman (uri_at_stemsystems.com)
Date: 01/05/05
- Next message: Scott Bryce: "Re: Dummy regex question"
- Previous message: sabio62: "Trouble with returning data from recursive sub"
- In reply to: Leon: "What's wrong with this program?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 05 Jan 2005 20:34:40 GMT
>>>>> "L" == Leon <lianjian@caip.rutgers.edu> writes:
L> #!/usr/bin/perl
L> use File::Find;
L> find(\&d, @ARGV);
L> sub d{
L> my $file=$File::Find::name;
L> $file =~ tr/A-Z/a-z/g;
^
L> print $file, "\n";
L> }
L> The error message is:
L> Bareword found where operator expected at re.sh line 7, near
L> "tr/A-Z/a-z/g"
L> syntax error at re.sh line 7, near "tr/A-Z/a-z/g"
tr IS NOT a regex nor is it s///. it has its own modifiers.
perldoc -f tr
uri
-- Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com --Perl Consulting, Stem Development, Systems Architecture, Design and Coding- Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
- Next message: Scott Bryce: "Re: Dummy regex question"
- Previous message: sabio62: "Trouble with returning data from recursive sub"
- In reply to: Leon: "What's wrong with this program?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|