Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: problem in running UNIX command through perl

by marcussen (Pilgrim)
on Oct 28, 2008 at 00:53 UTC ( #719875=note: print w/ replies, xml ) Need Help??


in reply to Re: problem in running UNIX command through perl
in thread problem in running UNIX command through perl

The quotes shouldn't interfere and would be required if he had spaces in his filenames for example

Confucius says kill mosquito unless cannon


Comment on Re^2: problem in running UNIX command through perl
Re^3: problem in running UNIX command through perl
by mpeever (Friar) on Oct 28, 2008 at 01:43 UTC
    It sometimes makes the code more readable to delimit strings in qq{}:
    my $cmd = qq{ egrep -f "$_proj_file" "$_running_file" > "$_admin_temp_ +file" }; my $result = `$cmd`; # or even qx{$cmd}
    That keeps you from having to escape quotes, etc.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (13)
As of 2014-12-18 11:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (50 votes), past polls