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

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

This is only a guess, but it's quite possible that your predecessor tried to construct a string that will be later used as shell command, that runs the script 'pers_lookup.csh' and passes it as an argument the value of the $sids[$index] variable. Sometimes later in the program there's probably a line that goes something like this:

system $isacon;

or maybe:

$isacon_output = `$isacon`; # (Notice the single back quotes.)

The way the code is currently written, it will probably not work, because it will literally use the string '$sids[$index]' as the argument. Of course, i don't know anything about your environment, so it's actually possible that it has some meaning to your shell.

You can try, very carefully, to replace the single quotes with double quotes, so the value of $sids[$index] will be actually used:

$isacon = "/apps/home/pfuser/scripts_56/GENERAL/pers_lookup.csh $sids[ +$index]"; print "isacon value: [$isacon]\n"; exit;

Run it, and if the isacon value that appears between the square brackets makes sense as a shell command in your environment, remove the lines with 'print' and 'exit'. Again, be very careful, because it may do unexpected things to your environment.


In reply to Re: What was the programmer trying to accomplish? by amir_e_a
in thread What was the programmer trying to accomplish? by kirkbrown

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found