use Text::ParseWords; use GetOpt::Std; @ARGV = shellwords($textin); my $cmd = shift @ARGV; my %opts; getopts('oif:', \%opts);