in reply to Comandline arguements when perl code is getting executed from command line
Second, why are you doing shell at all? Why not do this all in Perl?
open my $f, "<", "file" or die; while (<$f>) { chomp; my ($file_name, $type) = split /\|/; open my $inner, "<", $file_name or die; while (<$inner>) { if (/TABLE/) { print "$file_name:$type\n"; # last ? } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Comandline arguements when perl code is getting executed from command line
by jesuashok (Curate) on Jan 16, 2007 at 03:28 UTC |