[ale] Perl NewbieQ: backtick operator

Mills John M-NPHW64 Jmills at motorola.com
Tue May 18 16:35:33 EDT 2010


ALErs -

First: I attended the AUUG meeting when Michael Potter also gave his "'bash' with seatbelts and airbags" presentation and his comments and notes were a _huge_ help to me in debugging a script I was writing. As a low-level scripter I got a lot out of the talk. YMMV, but I recommend it. Thanks, Michael.

Second: I want to do my next set of scripts in Perl, of which I know nothing. I notice right off that Perl uses the "`" back-tick operators to return ("interpolate"?) stdout from a command for further script use.

My problem in 'bash' was numerous functions whose return strings may contain "`" characters that would burst 'bash's string capture and leave the shell interpreting random text returned by the external function. Fortunately the 'bash' operator "$( ... )" seem to have solved my problem.

Question: Are strings returned by the Perl construct "` ... `" protected from detecting embedded '`'s within the returned text and terminating the string capture?

TIA.
 - Mills
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20100518/14c77921/attachment.html 


More information about the Ale mailing list