> $FILENAME=ARGV[1];

$FILENAME=$ARGV[1]; ???

On February 20, 2004 03:40 pm, Juan Alberto Cirez wrote:
> Maybe I've had too much medication, but as far as I can tell this piece
> of code if supossed to read a file and spit out all the *.tgz lines it
> enounters:
>
> #!/usr/bin/perl
> $LOCATION=$ARGV[0];
> $FILENAME=ARGV[1];
> open(FILE, $FILENAME) || die "Error: Cannot open $FILENAME. Aborting...\n";
> while(<FILE>) {
>   chomp;
>   if($_ =~ /tgz$/) {
>     print "$_\n";
>   };
> };
> close FILE;
> print "Done proccessing $FILENAME...\n";
>
>
> #----------------
> I mean, there is no way there is something wrong with this, is there...?
> I am trying to teach my kid the art of coding....

-- 
Nick W (nickw77 at shaw.ca)
Registered Linux User #324288 (http://counter.li.org)
MSN Messenger: [EMAIL PROTECTED]
Yahoo: foolish_gambit
ICQ: 303276221
It's not our fault, we're outnumbered by stupid people ten to one.

_______________________________________________
clug-talk mailing list
[EMAIL PROTECTED]
http://clug.ca/mailman/listinfo/clug-talk_clug.ca

Reply via email to