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....
--
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
--oo0oo-- Juan Alberto Cirez - Software Developer --oo0oo--
=========== [EMAIL PROTECTED] =============
C, C++, Java, & Perl Linux development
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
Sunny and Beautiful Vancouver, Canada.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
_______________________________________________
clug-talk mailing list
[EMAIL PROTECTED]
http://clug.ca/mailman/listinfo/clug-talk_clug.ca