DBI problem

2005-12-12 Thread john
Hi all- I'm attempting to loop thru an input file, executing a SELECT query with the value from each line. The script works for the first iteration, and then gives these error messages: DBD::mysql::st fetchrow_hashref failed: fetch() without execute() at ./describe_skus.pl line 27, line 219

RE: extracting substrings from string using regexp

2005-12-12 Thread Pant, Hridyesh
Hi Owen, But in windows when I am trying to install Module YAPE::Regex I am getting below error Can't call method "ok" on an undefined value at > C:/Perl/site/lib/PPM/UI.pm line 881, <$__ANONIO__> line 17 Thanks&Regards Hridyesh -Original Message- From: Owen Cook [mailto:[EMAIL PROTECTE

RE: extracting substrings from string using regexp

2005-12-12 Thread Owen Cook
On Tue, 13 Dec 2005, Pant, Hridyesh wrote: > Hi, > I have successfully installed YAPE::Regex::Explain,but when I try to run > ant regex program I got below error > > Can't locate YAPE/Regex.pm in @INC (@INC contains: > C:\PROGRA~1\LUCKAS~1\ENGINS~2\ C:/Perl/lib C:/Perl/site/lib .) at > C:/Perl/

RE: extracting substrings from string using regexp

2005-12-12 Thread Pant, Hridyesh
Hi, I have successfully installed YAPE::Regex::Explain,but when I try to run ant regex program I got below error Can't locate YAPE/Regex.pm in @INC (@INC contains: C:\PROGRA~1\LUCKAS~1\ENGINS~2\ C:/Perl/lib C:/Perl/site/lib .) at C:/Perl/site/lib/YAPE/Regex/Explain.pm line 3. BEGIN failed--compil

New lines are not removed using HTML::Strip::Whitespace module

2005-12-12 Thread Durai raj
Hi All, I tried to remove white space and newlines from HTML pages using HTML::Strip::Whitespace module. It removes the white space, but not NEW LINES. Here is my script: use HTML::Strip::Whitespace qw(html_strip_whitespace); my $html = q {

Re: sort files by creation time

2005-12-12 Thread Brian Volk
Todd W wrote: "Brian Volk" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] After running a few tests... :~) I think I might be able to sort on the inode... ? Does this make sense? my @files = glob("/mnt/qdls/MSDSIN/*"); foreach my $file (@files) { print "$file\n"; my $in

RE: sort files by creation time

2005-12-12 Thread Brian Volk
-Original Message- From: Bob Showalter [mailto:[EMAIL PROTECTED] Sent: Monday, December 12, 2005 4:44 PM To: Brian Volk Cc: 'beginners@perl.org' Subject: Re: sort files by creation time Brian Volk wrote: > Hi All~ > > > > I'm using the glob function to grab all the files in a given

Satya Sai is out of the office.

2005-12-12 Thread Satya_Sai
I will be out of the office starting 12/12/2005 and will not return until 12/19/2005. I will respond to your message when I return. Please contact [EMAIL PROTECTED] or call DBA Hotline at 4477 for DBA assisstance. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

RE: sort files by creation time

2005-12-12 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Brian Volk wrote: > Hi All~ > > > > I'm using the glob function to grab all the files in a given > directory and then using crontab to check it every 5 minutes. Once I > have the files I'm using the diamond operator to read every line in > every file and *do something* if the line matches. He

Re: sort files by creation time

2005-12-12 Thread Todd W
"Brian Volk" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > After running a few tests... :~) I think I might be able to sort on the > inode... ? Does this make sense? > > my @files = glob("/mnt/qdls/MSDSIN/*"); > > foreach my $file (@files) { > >print "$file\n"; >my $ino =

Re: extracting substrings from string using regexp

2005-12-12 Thread Owen Cook
On Mon, 12 Dec 2005, Xavier Noria wrote: > On Dec 12, 2005, at 22:10, Owen wrote: > > > Xavier Noria wrote: > >> On Dec 12, 2005, at 11:10, Alexandre Checinski wrote: > > > >>> I have a string that looks like this : > >>> >>> name="pcmTcuFaultOutOfService"/> > > > >> > >> m// in list contex may

RE: sort files by creation time

2005-12-12 Thread Ryan Frantz
> -Original Message- > From: Brian Volk [mailto:[EMAIL PROTECTED] > Sent: Monday, December 12, 2005 4:47 PM > To: beginners@perl.org > Subject: RE: sort files by creation time > > After running a few tests... :~) I think I might be able to sort on the > inode... ? Does this make sense?

RE: sort files by creation time

2005-12-12 Thread Timothy Johnson
You could try something along these lines, where I create an array prepending the date in Perl time format and then sort the array. There is probably a better way, but this would work. Note: (stat $file)[9] is a list slice that represents only the 9th element of the list returned by 'stat $file

Re: convert string from lowercase to uppercase

2005-12-12 Thread John Doe
Buehler, Bob am Montag, 12. Dezember 2005 22.18: > Also: > > $name =~ tr/a-z/A-Z/; > > (the string is in $name variable) Ok, but this won't match words in my language (and others) or words containing unicode. :-) > -Original Message- > From: John Doe [mailto:[EMAIL PROTECTED] [...] > J

Re: extracting substrings from string using regexp

2005-12-12 Thread John Doe
Owen am Montag, 12. Dezember 2005 22.10: > Xavier Noria wrote: > > On Dec 12, 2005, at 11:10, Alexandre Checinski wrote: > >> I have a string that looks like this : > >> >> name="pcmTcuFaultOutOfService"/> > > > > m// in list contex may help: > > > > my ($id, $name) = $xml =~ m{id="([^"]*)".*n

RE: sort files by creation time

2005-12-12 Thread Brian Volk
After running a few tests... :~) I think I might be able to sort on the inode... ? Does this make sense? my @files = glob("/mnt/qdls/MSDSIN/*"); foreach my $file (@files) {

Re: sort files by creation time

2005-12-12 Thread Bob Showalter
Brian Volk wrote: Hi All~ I'm using the glob function to grab all the files in a given directory and then using crontab to check it every 5 minutes. Once I have the files I'm using the diamond operator to read every line in every file and *do something* if the line matches. Here's my ques

Re: extracting substrings from string using regexp

2005-12-12 Thread Xavier Noria
On Dec 12, 2005, at 22:10, Owen wrote: Xavier Noria wrote: On Dec 12, 2005, at 11:10, Alexandre Checinski wrote: I have a string that looks like this : m// in list contex may help: my ($id, $name) = $xml =~ m{id="([^"]*)".*name="([^"]*)"/>}; I despair of ever understanding REs

sort files by creation time

2005-12-12 Thread Brian Volk
Hi All~ I'm using the glob function to grab all the files in a given directory and then using crontab to check it every 5 minutes. Once I have the files I'm using the diamond operator to read every line in every file and *do something* if the line matches. Here's my questions: Given dire

RE: convert string from lowercase to uppercase

2005-12-12 Thread Buehler, Bob
Also: $name =~ tr/a-z/A-Z/; (the string is in $name variable) -Original Message- From: John Doe [mailto:[EMAIL PROTECTED] Sent: Monday, December 12, 2005 3:02 PM To: beginners@perl.org Subject: Re: convert string from lowercase to uppercase Jenny Chen am Montag, 12. Dezember 2005 21.4

Re: convert string from lowercase to uppercase

2005-12-12 Thread Chris Devers
On Mon, 12 Dec 2005, Jenny Chen wrote: > Does anyone know how to convert a string in lower case > to upper case in Perl? Thanks. Undoubtedly. How did you try to do it ? Did you try the s/// substitution feature ? perldoc -f s Did you try the tr/// transliteration operator ? perldoc -f tr

Re: extracting substrings from string using regexp

2005-12-12 Thread Owen
Xavier Noria wrote: > On Dec 12, 2005, at 11:10, Alexandre Checinski wrote: >> I have a string that looks like this : >> > name="pcmTcuFaultOutOfService"/> > > m// in list contex may help: > > my ($id, $name) = $xml =~ m{id="([^"]*)".*name="([^"]*)"/>}; I despair of ever understanding REs

Re: convert string from lowercase to uppercase

2005-12-12 Thread John Doe
Jenny Chen am Montag, 12. Dezember 2005 21.49: > Hi All, Hi > Does anyone know how to convert a string in lower case > to upper case in Perl? Thanks. yes, perldoc -f uc does. hth, joe -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

convert string from lowercase to uppercase

2005-12-12 Thread Jenny Chen
Hi All, Does anyone know how to convert a string in lower case to upper case in Perl? Thanks. Jenny -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Simple Ithread test

2005-12-12 Thread Venkatesan Saranathan
Hi List, I am trying to create a very simple program using Perl threads. My test program accepts list of host names from command line, creates a separate thread for each host name and within the thread, it pings the given host and stores the result in a shared hash. But this is giving unpredicta

Re: extracting substrings from string using regexp

2005-12-12 Thread Shawn Corey
Ing. Branislav Gerzo wrote: you should learn regexpes, they are very powerful. perldoc perlre See also: perldoc perlrequick Perl regular expressions quick start perldoc perlretut Perl regular expressions tutorial -- Just my 0.0002 million dollars worth, --- Shawn

modules for mail lists

2005-12-12 Thread Ing. Branislav Gerzo
Hello all, on web page I want to have subscribers for emails (there will be rss export too...), what is new, and so on. So I think, it would be nice to use some mail list manager. In DB I have emails, where to send, I will create message, use local SMTP and so on. But problem is with undeliverabl

Re: Problem with foreach

2005-12-12 Thread John W. Krahn
Andrej Kastrin wrote: > John W. Krahn wrote: > >> Andrej Kastrin wrote: >>> >>> I want to count words in the following file: >>> -- >>> ID- some number >>> TI- some text BB >>> AB- some text A BB >>> AU- some text >>> >>> ID- some number >>> TI- some GGG text >>> AB- s

Re: Problem with foreach

2005-12-12 Thread Andrej Kastrin
John W. Krahn wrote: Andrej Kastrin wrote: Hello dears, Hello, I want to count words in the following file: -- ID- some number TI- some text BB AB- some text A BB AU- some text ID- some number TI- some GGG text AB- some text GGG AU- some text ID- som

Re: Problem with foreach

2005-12-12 Thread John W. Krahn
Andrej Kastrin wrote: > Hello dears, Hello, > I want to count words in the following file: > -- > ID- some number > TI- some text BB > AB- some text A BB > AU- some text > > ID- some number > TI- some GGG text > AB- some text GGG > AU- some text > > ID- some number >

Re: extracting substrings from string using regexp

2005-12-12 Thread Xavier Noria
On Dec 12, 2005, at 11:10, Alexandre Checinski wrote: hello everyone, I have a simple question. I have a string that looks like this : name="pcmTcuFaultOutOfService"/> and I would like to store the values for id and name in two different variables. I know how to do it using regexp. But the wa

Re: extracting substrings from string using regexp

2005-12-12 Thread Ing. Branislav Gerzo
Alexandre Checinski [AC], on Monday, December 12, 2005 at 11:10 (+0100) wrote: from head: my $string = ''; my ($id, $name) = $string =~ /id="(\d+)".*?name="([^"]+)"/; AC> PS: I'm a total newbie... you should learn regexpes, they are very powerful. perldoc perlre For parsing XMl files use some

extracting substrings from string using regexp

2005-12-12 Thread Alexandre Checinski
hello everyone, I have a simple question. I have a string that looks like this : name="pcmTcuFaultOutOfService"/> and I would like to store the values for id and name in two different variables. I know how to do it using regexp. But the way I do it is done using several lines of code. I'm sure t

Problem with foreach

2005-12-12 Thread Andrej Kastrin
Hello dears, I want to count words in the following file: -- ID- some number TI- some text BB AB- some text A BB AU- some text ID- some number TI- some GGG text AB- some text GGG AU- some text ID- some number TI- some text AB- some text Z AU- some text --

Re: Input separator and block problem

2005-12-12 Thread Andrej Kastrin
Andrej Kastrin wrote: Hi I want to count words in the following file: -- ID- some number TI- some text BB AB- some text AU- some text ID- some number TI- some GGG text AB- some text AU- some text ID- some number TI- some text AB- some text Z AU- some text -