Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Use of system() considered harmful

by kyle (Abbot)
on Jun 06, 2008 at 21:01 UTC ( [id://690763]=note: print w/replies, xml ) Need Help??


in reply to Use of system() considered harmful

But what if my executable is /bin/foo bar?

Is this what you mean?

my $sh = '/home/kyle/harm/spacey name.sh'; open my $sh_fh, '>', $sh or die "Can't write '$sh': $!"; print $sh_fh 'echo "spaces are fun!"'; close $sh_fh; chmod 0755, $sh or die "Can't chmod '$sh': $!"; $sh =~ s/ /\\ /g; print qq{I shall now: system( "$sh" );\n}; system( "$sh" ); __END__ I shall now: system( "/home/kyle/harm/spacey\ name.sh" ); spaces are fun!

Or are you talking about something more ambiguous?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-20 04:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found