I believe the problem is that you are escaping the dollar sign $ in $ext
&bad_files($entry,$size) if($entry =~ /\$ext$/);
this should be
&bad_files($entry,$size) if($entry =~ /$ext$/);
the trailing dolar sign matches if the $entry variable ends with whatever
is in $ext variable
hope this helps
Tony B. Okusanya
DTS US Bancorp Center
Phone: (612)-303-0761
Pager: (612)-880-5757(@my2way.com)
Fax: (612)-303-0768
Mail: BC-MN-H18D
"David Liouville"
<[EMAIL PROTECTED]> To: "Rob Dowell" <[EMAIL
PROTECTED]>, [EMAIL PROTECTED],
Sent by: [EMAIL PROTECTED]
[EMAIL PROTECTED] cc:
veState.com Subject: Re: command line
arg
11/19/2003 08:54 AM
Please respond to "David
Liouville"
maby we have only part of informations and $ARGV[0] is use for anything
else ... but if there is only one argument, it's $ARGV[0] of course.
----- Original Message -----
From: Rob Dowell
To: [EMAIL PROTECTED] ;
[EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 3:14 PM
Subject: RE: command line arg
It should be :
$exy=$ARGV[0];
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
Tfbsr Bertrand
Sent: Wednesday, November 19, 2003 7:03 AM
To: [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: command line arg
I am trying to pass a file extension as a command line argument, then to
search all directories for that partcular extension, but have problem
getting it to work. Could you please advise.
$ext = $ARGV[1];
...
...
...
&bad_files($entry,$size) if($entry =~ /\$ext$/);
Thanks
Terry
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.542 / Virus Database: 336 - Release Date: 18/11/2003
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs