Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: What was the programmer trying to accomplish?

by stefbv (Curate)
on Jan 01, 2010 at 11:02 UTC ( [id://815164]=note: print w/replies, xml ) Need Help??


in reply to What was the programmer trying to accomplish?

Are you sure about the single quotes? Could be backticks.

Happy New Year to everybody!

  • Comment on Re: What was the programmer trying to accomplish?

Replies are listed 'Best First'.
Re^2: What was the programmer trying to accomplish?
by amir_e_a (Hermit) on Jan 01, 2010 at 14:02 UTC

    Indeed, maybe backticks (``) could be used on this line directly:

    $isacon = `/apps/home/pfuser/scripts_56/GENERAL/pers_lookup.csh $sids[$index]`;

    Backticks, like the double quotes (""), interpolate the string, which means that they translate every variable to its value. Then they run the string as a shell command and return the output.

    Since you are not sure about the programmer's intention, you should still test it first with double quotes and check the result, for example by printing it, and only then you should run it with backticks or system.

    Read more about all the different types of quotes here: Quote-like Operators in perlop.

Log In?
Username:
Password:

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

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

    No recent polls found