At 11:20 AM 8/23/01 -0700, Buffy Press wrote:
>Hello,
>
>I am *very new* to Perl and to this list. I have a question I am hoping
>someone can answer. I am looking over an existing Perl script and came
>across this block of code:
>
> # Create the cmdfile
> my $runprog = "$NexBase::idxBase/cmdfiles/$indexname > $cmdfile";
> exit $? if system($runprog);
>
>Can anyone tell me what the > symbol means here:
>
>my $runprog = "$NexBase::idxBase/cmdfiles/$indexname > $cmdfile";
>
>I have looked in O'Reilly's Programming Perl book and found lots of
>information about the > symbol, but I could not see how it relates in
>the above variable.
That symbol is not going to be used by Perl. The variable $runprog is
being initialized to contain a command to be passed to your OS' command
line interpreter (the Bourne shell on Unix-y systems). You'll see $runprog
used later in that program in either a system() or exec() function call, or
between backticks (``) (or, less likely, in an open() call).
If you're unfamiliar with the Bourne shell, consult a reference such as
"Unix Shell Programming" by Kochan & Wood, Hayden Books (happens to be on
the shelf in front of me).
--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]