Perl script for taking inputs from one script and storing them into a document.

Hi. I wanted to create a Perl script which can take the outputs of a Perl script as it's input and temporarily store them in a document. Need help.

Thanks.:slight_smile:

perlscript >temporary_document

It's not working:

$ blc.pl >Test
bash: blc.pl: command not found

Probably you may missed the shebang line ( perl interpreter location ) in your perl program. add the line and the try to execute the perl file

seems like it's working now but can anybody tell me where the temporary file will be created?

---------- Post updated at 11:53 AM ---------- Previous update was at 11:52 AM ----------

i already tried looking in the current dir and tmp dir but could not find it....

---------- Post updated at 04:22 PM ---------- Previous update was at 11:53 AM ----------

Hi,

Can you please tell me where the file created by the above mentioned command is stored?

Eh, in the current working directory, you should probably read up on shell redirection to understand more about how this is works.

i mentioned in my last post that i could not find it in the current working directory. :frowning:

To provide accurate answer we need accurate datas.

So far we still don't know :

  • On which OS you are
  • Which Shell you are using
  • In which PATH you are
  • In which PATH your script is
  • What is the code of the script you are using

If you want that people take the time to provide you accurate informations, you need to take the time to clarify your demande and provide more infos.

Does the Perl script in question exec a shell in a new directory ?

because

 command > filename

streams the output of command to a new file called filename in the current directory