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

Re^4: Comparision Utility PERL

by vighneshmufc (Acolyte)
on Feb 09, 2018 at 09:56 UTC ( #1208797=note: print w/replies, xml ) Need Help??

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

ok ignore the file3 it was basically for just saving the result to a new file. where can i get the syntax for passing arrays as a command line argument?

Replies are listed 'Best First'.
Re^5: Comparision Utility PERL
by hippo (Canon) on Feb 09, 2018 at 10:03 UTC
      my $file1=$ARGV[0];
      my $file2=$ARGV1;
      my $file3=$ARGV2;
      my @cols = (0, 2);
      so instead of 0 and 2 i want it to be user defined so how do i declare it with this method instead of Getopt::Long and other such steps

        For those 4 variables I would do this:

        my ($file1, $file2, $file3, @cols) = @ARGV;

        But I would not use $file1, $file2, $file3 as names in the first place as they aren't all that descriptive. Perhaps $patternfile, $inputfile, $outputfile might be my choices.

        What do you have against Getopt::Long?

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2018-06-19 23:13 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (116 votes). Check out past polls.