in reply to How to pass a file to GetOpt
Your GetOptions call puts the pathnames of the files in the variables $input and $output. So now you just need to open those files and do stuff with them:
open my $in, '<', $input or die $!; open my $out, '>', $output or die $!; while(<$in>){ # do stuff to $_ print $out $_; # or whatever output you come up with }
Aaron B.
Available for small or large Perl jobs; see my home node.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to pass a file to GetOpt
by Anonymous Monk on Jul 10, 2012 at 23:26 UTC | |
by Anonymous Monk on Jul 10, 2012 at 23:46 UTC | |
by Anonymous Monk on Jul 11, 2012 at 00:27 UTC | |
by kcott (Archbishop) on Jul 11, 2012 at 00:57 UTC | |
by frozenwithjoy (Priest) on Jul 11, 2012 at 04:58 UTC | |
|