http://qs1969.pair.com?node_id=11136412


in reply to Re^2: Automating execution of shell scripts
in thread Automating execution of shell scripts

$text = @_;

This evaluates @_ in scalar context, returning the number of parameters instead of the actual value. Instead, use

my ($text) = @_;

Also,

if ($_ =~ ".*user_name.*"){

is better written as

if (/user_name/) {

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]