|
Posted by J. Gleixner on March 20, 2008, 7:43 pm
Please log in for more thread options Vinay Nagrik wrote:
>> ccc31807 wrote:
>>>> Hello Group,
>>>> I am new to learning Perl and am struggling with a syntex encountered
>>>> in the code. It looks like
>>>> < a.txt b.pl > signature
>>>> My question is
>>>> what does the first character (<) mean.
>>>> What b.pl is doing with a.txt.
>>>> I guess the output of the program goes to signature.
>>>> BTW: The line I mentioned was in a bash script file.
>>>> Can someone help.
>>>> Thanks.
>>>> nagrik
>>> < and > are redirection operators. The line you quote can be
>>> translated as follows:
>>> Get the input (<) from the file named 'a.txt', run the script named
>>> 'b.pl', and write the output (>) to the file named 'signature'.
>> but that's not perl, BTW
>>
>> hth
> As I said earlier this line was written in a bash script, and looks
> like reading a file inside a perl script and then outputing it.
As Tony said earlier, "that's not perl". Or more bluntly, the
redirection operators in a bash script have nothing at all to
do with perl, so why are you asking in this newsgroup?
Ask what it does in a bash newsgroup or experiment with it on your
own. Hint: run it with a made up file name, instead of one that
exists.
< dummy b.pl > signature
|