No such thing as a small change | |
PerlMonks |
Re: Converting bash script to perlby Moron (Curate) |
on Jun 28, 2006 at 16:22 UTC ( [id://558059]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|