Fedora Linux Support Community & Resources Center
  #1  
Old 13th November 2004, 03:59 AM
satimis Offline
Registered User
 
Join Date: Jul 2004
Posts: 1,386
Perl - how to print to file

Hi folks,

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
Reply With Quote
  #2  
Old 13th November 2004, 05:13 AM
james_in_denver Offline
Registered User
 
Join Date: Oct 2004
Posts: 1,227
I think you need to study the PERL language some more.

Yes, Perl has this capability, all you have to do is open a file for read/write access.

I think that perhaps you should visit
http://www.perl.org/
Reply With Quote
Reply

Tags
file, perl, print

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Print to file/ print to PDF print driver? BillyBoy Using Fedora 3 22nd February 2012 09:42 AM
Converting a .txt file into array for processing with PERL BPfedora Programming & Packaging 2 12th October 2007 07:02 PM
Perl simple file IO need help Eggroll822 Programming & Packaging 12 28th April 2006 11:56 PM
Does any RPM contain the perl info file(s)? bbarnard Using Fedora 7 22nd August 2005 09:25 PM


Current GMT-time: 15:37 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat