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]
|
---|
In Section
Seekers of Perl Wisdom