"getopt" will split @argv for you, and do the right thing.
perl -MGetopt::Std -E 'getopts("oif:"); say $_,"=",${"opt_$_"} for qw +|o i f|' -- -o -f this o=1 i= f=this
This is not an optical illusion, it just looks like one.
In reply to Re: Scalar to @ARGV for Getopt::Std
by NetWallah
in thread Scalar to @ARGV for Getopt::Std
by c64whiz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |