![]() |
| ||
| How to print to file Hi folks, Perl === Instead of using following command printing output to a file; $ perl AAA.pl > /pathto/name_of_file is it possible adding "print file function" to the script 1) If YES Please advise how to make it. 2) Can I add following bash syntax to the script user=$(whoami); now=$(date +%Y.%m.%d.%R); File="/tmp/satimis/comparison_${user}_${now}.txt"; so that the printout file will carry name of creator, date and time, etc. If possible please shed me some light to re-edit the script. TIA B.R. satimis |
| ||
| Re: How to print to file on question number one, you could just pipe the output of the command to the lpd daemon, or whatever program you use: perl AAA.pl | lpd on question two, you could use the system() function, I do believe. I'm not a Perl programmer (I only play one on TV!), but you might be able to do something like this using backticks ` `: user=`whoami`; From Perl Documentation: Quote:
|
| ||
| Re: How to print to file Hi alc6379, Tks for your advice. Problem solved already. B.R. satimis |
| ||
| Re: How to print to file Quote:
i have to print the output which is coming after running the program in the c++ compiler tell me the way how to print that output or how to take screen shorts of that the output consist of one graphical picture |
| ||
| Re: How to print to file This thread is three years old surinder oberoi and this forum is for asking perl questions. |
| All times are GMT -4. The time now is 10:37 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC