Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: what difference does a command run in shell and in perl

by Gulliver (Monk)
on May 22, 2011 at 14:53 UTC ( [id://906169]=note: print w/replies, xml ) Need Help??


in reply to what difference does a command run in shell and in perl

BrowserUK already pointed out your particular problem with backticks. One thing I would suggest is you can use characters other than '/' for matching and substitution, etc. I'm a big fan of doing this when it makes things easier to follow. Anytime '/' or '\' is involved is a good time for {} or other characters.

########################################################## # change back slashes to forward sub slashfwd { my $retval = $_[0]; $retval =~ s{\\} {/}g; return $retval; }

Log In?
Username:
Password:

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

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

    No recent polls found