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

Re: Converting bash script to perl

by Moron (Curate)
on Jun 28, 2006 at 16:22 UTC ( [id://558059]=note: print w/replies, xml ) Need Help??


in reply to Converting bash script to perl

Some hints:

Perl variable names ('scalars') actually begin with the dollar sign whereas in bash the dollar is used an operator to dereference the variable.

The print command should replace the bash 'echo'.

sed-like operators can be used directly perl without spawning a sed process.

Instead of direct use of a pipe to a program, use the open command (the documentation also refers to multichannel piping) to spawn the process and generate filehandles to read or write to the pipe.

-M

Free your mind

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-04-18 05:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found