print file

2006-05-08 Thread badrinath chitrala
Hi open FILE, "file.txt" or die $!; while () Sombody please tell me why do i get the message as below if i want to print the contents of text file Name "main::FILE" used only once: possible typo at nl.plx line3. 1:f:/file.txt and my file is not executed (i did not get the output) regards Badr

print file

2006-05-10 Thread Rustam Hamidullin
open FILE, "){ ... } -- Приятной работы... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

print file

2006-05-10 Thread Rustam Hamidullin
$txt = `type file.txt`; ... -- Приятной работы... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: print file

2006-05-08 Thread Thomas Bätzler
badrinath chitrala <[EMAIL PROTECTED]> asked: > open FILE, "file.txt" or die $!; > while () > > Sombody please tell me why do i get the message as below if i > want to print the contents of text file I would suggest you use the three argument open, i.e. OPEN FILE, '<', $file or die "Can

Re: print file

2006-05-08 Thread John W. Krahn
badrinath chitrala wrote: > Hi Hello, > open FILE, "file.txt" or die $!; open() creates the filehandle FILE which is associated with the contents of the file "file.txt". > while () You are using a file glob to get a list of file names which is the same as doing: while ( defined( $_ = glob '

RE: print file

2006-05-08 Thread Bedanta Bordoloi, Gurgaon
Try this: open(FILE,"f:/file.txt") || print("open() failed as file did not exist.\n"); while (){ print $_; } Bedanta -Original Message- From: badrinath chitrala [mailto:[EMAIL PROTECTED] Sent: Monday, May 08, 2006 2:46 PM To: beginners@perl.org Subject:

RE: print file

2006-05-08 Thread Timothy Johnson
file. -Original Message- From: Bedanta Bordoloi, Gurgaon [mailto:[EMAIL PROTECTED] Sent: Monday, May 08, 2006 2:24 AM To: badrinath chitrala; beginners@perl.org Subject: RE: print file Try this: open(FILE,"f:/file.txt") || print("open() failed as file did not exis

new line "\n" for print file

2005-03-31 Thread Brian Volk
Hello, Can someone explain how I can add "\n" to this line of code If that is really my problem.. :~) copy ($print_file, '//hp-exch/HP4100-IS'); The reason I ask is here's what I'm printing; (teminal veiw) --begin Green Solutions Industrial Cleaner is a non-toxic, heavy-duty produc

Scan/Parse directory for "newest" file, print file timestamp and compute date/time difference - Some advice please

2011-03-02 Thread newbie01 perl
Hi all, Am wanting to get some advise on how to write this Perl script. I have a backup directory that I have to check for the existence of file/s and if the latest file that exist there is 2 days old, that means I have a problem and had to send an email notification. To illustrate if, for examp

Re: Scan/Parse directory for "newest" file, print file timestamp and compute date/time difference - Some advice please

2011-03-02 Thread Shawn H Corey
On 11-03-02 11:34 AM, newbie01 perl wrote: My main hurdle is the file timestamp and date arithmetic part. Frm Google'ing, am leaning towards using stat which am hoping will work on both Unix and Windows. Some guidance will be much appreciated. Thanks in advance. Use the stat function to get th

Re: Scan/Parse directory for "newest" file, print file timestamp and compute date/time difference - Some advice please

2011-03-02 Thread shawn wilson
First, use File::Find to get your info (or you could use system( ls -l ) and split - either way). To compare your time stamps, use DateTime and do dt1 - dt2

Re: Scan/Parse directory for "newest" file, print file timestamp and compute date/time difference - Some advice please

2011-03-02 Thread Shawn H Corey
On 11-03-02 12:12 PM, shawn wilson wrote: First, use File::Find to get your info (or you could use system( ls -l ) and split - either way). To compare your time stamps, use DateTime and do dt1 - dt2 No. If you can do all your calculations using seconds from the epoch, then do so. Only conve

Re: Scan/Parse directory for "newest" file, print file timestamp and compute date/time difference - Some advice please

2011-03-02 Thread shawn wilson
On Mar 2, 2011 12:16 PM, "Shawn H Corey" wrote: > > On 11-03-02 12:12 PM, shawn wilson wrote: >> >> First, use File::Find to get your info (or you could use system( ls -l ) and >> split - either way). To compare your time stamps, use DateTime and do dt1 - >> dt2 >> > > No. If you can do all your

Re: Scan/Parse directory for "newest" file, print file timestamp and compute date/time difference - Some advice please

2011-03-02 Thread Shawn H Corey
On 11-03-02 12:31 PM, shawn wilson wrote: Seems like more of a pain for a modest gain in speed to me. I like find and dt because its quick and easy. Either way though. No, because you don't have to worry about daylight-savings time or switching time zones. Seconds from the epoch is the same o

Re: Scan/Parse directory for "newest" file, print file timestamp and compute date/time difference - Some advice please

2011-03-02 Thread Jim Gibson
On 3/2/11 Wed Mar 2, 2011 8:34 AM, "newbie01 perl" scribbled: > Hi all, > > Am wanting to get some advise on how to write this Perl script. > > I have a backup directory that I have to check for the existence of file/s > and if the latest file that exist there is 2 days old, that means I have