Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^5: Comparision Utility PERL

by hippo (Canon)
on Feb 09, 2018 at 09:42 UTC ( #1208794=note: print w/replies, xml ) Need Help??

in reply to Re^4: Comparision Utility PERL
in thread Comparision Utility PERL

If you want the user to specify specific column numbers then you can pass that as an array in the range of the for loop instead of using all the columns. eg:

my @cols = (0, 2); # You would actually get these from @ARGV but it do +esn't matter here # ... for my $fieldnum (@cols) { if ( exists $hash{ $fields[$fieldnum] } ) { print $fh "$row\n"; next; } }

I'm going to ignore any mention of "file3" since this is the first time you have brought it up. See also How do I change/delete my post? lest your changes make no sense.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1208794]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (1)
As of 2018-07-19 03:45 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (401 votes). Check out past polls.