Re: Opening File - Used to Work but does not now

2008-10-26 Thread AndrewMcHorney
The colon was the problem At 02:18 PM 10/26/2008, Mr. Shawn H. Corey wrote: On Sun, 2008-10-26 at 14:10 -0700, AndrewMcHorney wrote: > Hello > > I have some perl code that was working and for the life of me I > cannot determine why it is is failing now. All I am trying to do is > to create and o

Re: How to Determine why a File Failed to Open

2008-10-26 Thread John W. Krahn
AndrewMcHorney wrote: Hello Hello, Is there a way in Perl to find out why a file failed to open? I am working on a script that is opening and reading a lot of files. This script is right now being written on a Windows based system. perldoc perlvar [ *snip* ] $OS_ERROR $ERRNO

Re: recurse dir & files

2008-10-26 Thread John W. Krahn
Brian wrote: John W. Krahn wrote: Brian wrote: Unknown PerlIO layer "mmap" at mysearch.pl line 14, line 1. I thought that Windows supported memory mapping, oh well. Cannot open file "dummy.txt No such file or directory at mysearch.pl line 14 line 1. the script is placed under C: and

Re: Opening File - Used to Work but does not now

2008-10-26 Thread Dr.Ruud
AndrewMcHorney schreef: > ($Seconds,$Minutes,$Hours,$Day,$Month,$Year) = > (localtime)[0,1,2,3,4,5]; > $Year = $Year + 1900; Your $Month has a value from 0 to 11. > $Date = > $Month."-".$Day."-".$Year.".".$Hours.":".$Minutes.":".$Seconds; This sorts a lot better: my @date = (localtime)[5,4,

Re: Opening File - Used to Work but does not now

2008-10-26 Thread Rob Dixon
AndrewMcHorney wrote: > > I have some perl code that was working and for the life of me I > cannot determine why it is is failing now. All I am trying to do is > to create and open a new file using a date time stamp in the > filename. Below is the code snippet for the open, It is returning an

Re: Opening File - Used to Work but does not now

2008-10-26 Thread Mr. Shawn H. Corey
On Sun, 2008-10-26 at 14:10 -0700, AndrewMcHorney wrote: > Hello > > I have some perl code that was working and for the life of me I > cannot determine why it is is failing now. All I am trying to do is > to create and open a new file using a date time stamp in the > filename. Below is the code

Opening File - Used to Work but does not now

2008-10-26 Thread AndrewMcHorney
Hello I have some perl code that was working and for the life of me I cannot determine why it is is failing now. All I am trying to do is to create and open a new file using a date time stamp in the filename. Below is the code snippet for the open, It is returning an invalid argument error.

Re: How to Determine why a File Failed to Open

2008-10-26 Thread Dr.Ruud
"Rodrick Brown" schreef: > ie. open ( FH, " -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Reading Files - Which approach is best

2008-10-26 Thread Mr. Shawn H. Corey
On Sun, 2008-10-26 at 09:15 -0700, AndrewMcHorney wrote: > Hello > > I am continuing work on my script. I know there are many ways to read > files. I am going to be opening files that are text and also that are binary. > > Here are my 2 ways that I have done it it in the past. I am wondering >

Reading Files - Which approach is best

2008-10-26 Thread AndrewMcHorney
Hello I am continuing work on my script. I know there are many ways to read files. I am going to be opening files that are text and also that are binary. Here are my 2 ways that I have done it it in the past. I am wondering which way is best. $_ = join '',() or @SourceLine = () Which one i

Re: How to Determine why a File Failed to Open

2008-10-26 Thread Rodrick Brown
On Sun, Oct 26, 2008 at 11:35 AM, AndrewMcHorney <[EMAIL PROTECTED]>wrote: > Hello > > Is there a way in Perl to find out why a file failed to open? I am working > on a script that is opening and reading a lot of files. This script is right > now being written on a Windows based system. > > Andrew

How to Determine why a File Failed to Open

2008-10-26 Thread AndrewMcHorney
Hello Is there a way in Perl to find out why a file failed to open? I am working on a script that is opening and reading a lot of files. This script is right now being written on a Windows based system. Andrew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EM

Re: recurse dir & files

2008-10-26 Thread Brian
Mr. Shawn H. Corey wrote: }, '/test'; }}, '/test'; # One for the while, one for the sub Thank you. Somethings happening, hopefully it won't be too many hours before it terminates. Brian -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAI

Re: recurse dir & files

2008-10-26 Thread Mr. Shawn H. Corey
On Sun, 2008-10-26 at 14:57 +, Brian wrote: > They are all tiny text files. > > I now have the following code:- > > #!/usr/bin/perl > use warnings; > use strict; > use File::Find; > > open my $REPORT, '>', 'dummy.txt' or die "Cannot open 'dummy.txt' $!"; > print $REPORT scalar localtime, "\n

Re: recurse dir & files

2008-10-26 Thread Brian
John W. Krahn wrote: Brian wrote: John W. Krahn wrote: Brian wrote: I would like to do a recursive search of directories and files, checking to see if a file contains a certain string. will be a string containing whitespace(s). As soon as I hit enter, I would like dummy.txt to be time stamp

Re: recurse dir & files

2008-10-26 Thread John W. Krahn
Brian wrote: John W. Krahn wrote: Brian wrote: I would like to do a recursive search of directories and files, checking to see if a file contains a certain string. will be a string containing whitespace(s). As soon as I hit enter, I would like dummy.txt to be time stamped and again at termi

Re: recurse dir & files

2008-10-26 Thread Brian
Dr.Ruud wrote: Brian schreef: Dr.Ruud: Brian: Peter Scott: Brian: I would like to do a recursive search of directories and files, checking to see if a file contains a certain string. Type perldoc File::Find Thanks, but it all became chinese after a few lines. Put "LANG=C " before the pr

Re: recurse dir & files

2008-10-26 Thread Dr.Ruud
Brian schreef: > Dr.Ruud: >> Brian: >>> Peter Scott: Brian: > I would like to do a recursive search of directories and files, > checking to see if a file contains a certain string. Type perldoc File::Find >>> >>> Thanks, but it all became chinese after a few lines. >> >> Put

Re: recurse dir & files

2008-10-26 Thread Brian
John W. Krahn wrote: Brian wrote: Hello Hello, I would like to do a recursive search of directories and files, checking to see if a file contains a certain string. will be a string containing whitespace(s). As soon as I hit enter, I would like dummy.txt to be time stamped and again at ter

Re: recurse dir & files

2008-10-26 Thread John W. Krahn
Brian wrote: Hello Hello, I would like to do a recursive search of directories and files, checking to see if a file contains a certain string. will be a string containing whitespace(s). As soon as I hit enter, I would like dummy.txt to be time stamped and again at termination. I'm playing

Re: recurse dir & fil

2008-10-26 Thread Brian
Jeff Pang wrote: 2008/10/26 Brian <[EMAIL PROTECTED]>: Jeff Pang wrote: find /path -type f -exec grep -H "string" {} \; Tried this different ways, all come out with closely the same error messages. With no kbd input, if I change your line to .. find /test -type f -exec grep -H "fred blogg

Re: recurse dir & fil

2008-10-26 Thread Jeff Pang
2008/10/26 Brian <[EMAIL PROTECTED]>: > Jeff Pang wrote: >> >> find /path -type f -exec grep -H "string" {} \; >> >> > > Tried this different ways, all come out with closely the same error > messages. > > With no kbd input, if I change your line to .. > find /test -type f -exec grep -H "fred blogg

Re: recurse dir & files

2008-10-26 Thread Brian
Dr.Ruud wrote: Brian schreef: Peter Scott: Brian: I would like to do a recursive search of directories and files, checking to see if a file contains a certain string. Type perldoc File::Find Thanks, but it all became chinese after a few lines. Put "LANG=C " before the previous command.

Re: recurse dir & files

2008-10-26 Thread Dr.Ruud
Brian schreef: > Peter Scott: >> Brian: >>> I would like to do a recursive search of directories and files, >>> checking to see if a file contains a certain string. >> >> Type perldoc File::Find > > Thanks, but it all became chinese after a few lines. Put "LANG=C " before the previous command.

Re: recurse dir & file

2008-10-26 Thread Brian
Jeff Pang wrote: 2008/10/26 Brian <[EMAIL PROTECTED]>: Hello I would like to do a recursive search of directories and files, checking to see if a file contains a certain string. will be a string containing whitespace(s). As soon as I hit enter, I would like dummy.txt to be time stamped and agai

Re: Reading a list of numbers from a file into a array

2008-10-26 Thread John W. Krahn
vendion wrote: Hello I am having trouble finding the correct syntax for reading a list of numbers from a file, it is open and can read from it, I tried with while () { chomp; @some_array = $_; print "@some_array\n"; } my @some_array; while ( ) { chomp; push @som

Re: recurse dir & files

2008-10-26 Thread Brian
Peter Scott wrote: On Sun, 26 Oct 2008 08:52:09 +, Brian wrote: I would like to do a recursive search of directories and files, checking to see if a file contains a certain string. Type perldoc File::Find Thanks, but it all became chinese after a few lines. Brian -- To unsubs

Reading a list of numbers from a file into a array

2008-10-26 Thread vendion
Hello I am having trouble finding the correct syntax for reading a list of numbers from a file, it is open and can read from it, I tried with while () { chomp; @some_array = $_; print "@some_array\n"; } and @some_array = ; print "@some_array\n"; but in both cases it reads

Re: recurse dir & files

2008-10-26 Thread Peter Scott
On Sun, 26 Oct 2008 08:52:09 +, Brian wrote: > I would like to do a recursive search of directories and files, checking > to see if a file contains a certain string. Type perldoc File::Find -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ -- To unsubscribe,

Re: MIME::Lite debugging

2008-10-26 Thread Jeff Pang
2008/10/26 AaronLS <[EMAIL PROTECTED]>: > I am trying to modify an existing script that uses MIME::Lite->send > > I am trying to take any debug output and send it through a Debug > function which goes to a log file so I can see if there is an error. > Am I doing this correctly?: > > I'm not using d

Re: using unix command issue...

2008-10-26 Thread 悬非
try: $LANstat = system(" $utadm_l | grep On") ; change => my $LANstat = ` $utadm_l | grep On` ; good luck:) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

MIME::Lite debugging

2008-10-26 Thread AaronLS
I am trying to modify an existing script that uses MIME::Lite->send I am trying to take any debug output and send it through a Debug function which goes to a log file so I can see if there is an error. Am I doing this correctly?: I'm not using die because I think that sends it to stdout. The do

Re: recurse dir & file

2008-10-26 Thread Jeff Pang
2008/10/26 Brian <[EMAIL PROTECTED]>: > Hello > I would like to do a recursive search of directories and files, checking to > see if a file contains a certain string. > will be a string containing whitespace(s). > As soon as I hit enter, I would like dummy.txt to be time stamped and again > at ter

recurse dir & files

2008-10-26 Thread Brian
Hello I would like to do a recursive search of directories and files, checking to see if a file contains a certain string. will be a string containing whitespace(s). As soon as I hit enter, I would like dummy.txt to be time stamped and again at termination. I'm playing about with 9.85GB (2.57