Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Automating execution of shell scripts

by choroba (Archbishop)
on Sep 03, 2021 at 13:01 UTC ( #11136412=note: print w/replies, xml ) Need Help??


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]

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11136412]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (1)
As of 2022-05-22 10:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (80 votes). Check out past polls.

    Notices?