in reply to Re^3: GetOpts not working:
in thread GetOpts not working:
use strict; use warnings; my %args = @ARGV; print "Infile: $args{-infile}\n", "Outfile: $args{-outfile}" if ( exis +ts $args{-infile} && exists $args{-outfile} );
I fed it '-infile data_in.bin -outfile data_out.bin'. and it almost seems like it has assigned key/value pairs based off of my thought patterns lol <.<
I guess what i am asking is, how did it build the hash? and why did my %args = @ARGV; build it correctly like that. How is 'data_in.bin' and 'data_out.bin' not a key? if key -infile contains value 'data_in.bin' then what assigned 'data_in.bin' to be its value? there was no shifting or anything to loop through the input args
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: GetOpts not working:
by hippo (Archbishop) on Dec 10, 2015 at 16:08 UTC | |
by james28909 (Deacon) on Dec 10, 2015 at 16:30 UTC |