develooper Front page | perl.beginners | Postings from February 2002

command line arguments

Thread Next
February 6, 2002 11:29
command line arguments
Message ID:
This script gives me nothing:

#!/usr/bin/perl -F/\t/ -ap
print @F[14 .. 17] if $F[0] eq "H" and $F[5] = 1816;
print @F[14 .. 17] if $F[0] eq "H" and $F[5] = 5380;
print @F[14 .. 17] if $F[0] eq "H" and $F[5] = 5370;

The file is indeed tab delimited, and the sixth field should have a number
in it the line starts with a 'H'. When I run this script in debug mode,
there is nothing in the array @F. 

version of perl:	5.003 (upgrade is not a consideration right now...
:-( )

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About