Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: problem in running UNIX command through perl

by marcussen (Pilgrim)
on Oct 28, 2008 at 00:53 UTC ( [id://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

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://719875]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-19 14:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found