Re: Simple split() question

2001-06-30 Thread Eric Beaudoin
At 01:40 2001.07.01, Jeff 'japhy' Pinyan wrote: >On Jun 30, Sanjeeb Basak said: > >>I want to perform a simple split operation, but can't get the regular expr >>working. Can anybody help me on this? >> >>my $line from a file read is: >>xyz abc 12sd "pqr stz" dfg (delimited by blank char). >> >>I'm

Re: Simple split() question

2001-06-30 Thread Jeff 'japhy' Pinyan
On Jun 30, Sanjeeb Basak said: >I want to perform a simple split operation, but can't get the regular expr >working. Can anybody help me on this? > >my $line from a file read is: >xyz abc 12sd "pqr stz" dfg (delimited by blank char). > >I'm doing >my ($par1, $par2, $par3, $par4, $par5) = split(/

Simple split() Regexp question

2001-06-30 Thread Sanjeeb Basak
Hi, I want to perform a simple split operation, but can't get the regular expr working. Can anybody help me on this? my $line from a file read is: xyz abc 12sd "pqr stz" dfg (delimited by blank char). I'm doing my ($par1, $par2, $par3, $par4, $par5) = split(/ /, $line); and I'm getting $par4 =

Simple split() question

2001-06-30 Thread Sanjeeb Basak
Hi, I want to perform a simple split operation, but can't get the regular expr working. Can anybody help me on this? my $line from a file read is: xyz abc 12sd "pqr stz" dfg (delimited by blank char). I'm doing my ($par1, $par2, $par3, $par4, $par5) = split(/ /, $line); and I'm getting $par4 =

Tk::After Error

2001-06-30 Thread Adam Theo
Hello, Adam Theo here; i have built a Tk program to act as a alarm clock. it was a while ago that i created it, and was pretty sure it was working, but now that i go back to it, it is giving this error when i press the button to stop the alarm: Tk::Error: Can't locate object method "IsWidget

Re[2]: ENV & $HOME

2001-06-30 Thread Tim Musson
Hey Michael, Wednesday, June 27, 2001, 3:17:32 AM, my MUA believes you used (X-Mailer not set) to write: MF> On Wed, Jun 27, 2001 at 02:37:55AM -0400, Adam Theo wrote: >> i am looking for a way my perl program can automatically get the >> home directory of the user. >> linux, windows, mac, etc?

Re[7]: Best practice for config file use?

2001-06-30 Thread Tim Musson
Hey Grant, Thursday, June 28, 2001, 5:34:26 PM, my MUA believes you used Internet Mail Service (5.5.2653.19) to write: GM> You might like to check out XML::Simple it was designed for GM> exactly this problem. GM> If you put your config data in a file called foo.xml: GM> GM> foo GM>

RE: MYSql (fwd)

2001-06-30 Thread Steve Howard
You need DBI and DBD::MySQL They should be avaliable on CPAN, or if you are using ActivePerl or PPM they can be installed with just: ppm install DBI ppm install DBD::MYSQL That should be all you need to interact with MySQL. Steve Howard -Original Message- From: Ryan Gralinski [mailto:

MYSql (fwd)

2001-06-30 Thread Ryan Gralinski
I can't find a module to open and read/write to a mySql database, can someone help me out? Ryan

Artistic License 2.0

2001-06-30 Thread Adam Theo
Hello, Adam Theo here; i was wondering if the artistic license version 2.0 that i think is going to be used for Perl6 is finished? can it be effectively used as a standalone license, or should it be used in conjunction with the GPL again? if someone could point me to a webpage or email it to

RE: How is this doing what I want it too?

2001-06-30 Thread Brett W. McCoy
On Sat, 30 Jun 2001, Steve Howard wrote: > And (Since there are so many ways to do things in Perl) if you absolutely > needed the index of the array as you were printing (like if something else > was being done inside the loop besides a simple loop) you can still do it > simpler than the C like l

RE: How is this doing what I want it too?

2001-06-30 Thread Steve Howard
And (Since there are so many ways to do things in Perl) if you absolutely needed the index of the array as you were printing (like if something else was being done inside the loop besides a simple loop) you can still do it simpler than the C like loop you are using by doing a: foreach (0..scalar(

Re: How is this doing what I want it too?

2001-06-30 Thread Brett W. McCoy
On Fri, 29 Jun 2001, Toni Janz wrote: > I will attatch it to this email so that mayhap you can explain why it > does what it does. Please don't send attachments to the list, just include your code int eh body of the message. A lot of attachments don't come with the proper MIME header and can't

Re: How is this doing what I want it too?

2001-06-30 Thread Randal L. Schwartz
> "Abdulaziz" == Abdulaziz Ghuloum <[EMAIL PROTECTED]> writes: Abdulaziz> What you need instead is to say: Abdulaziz> for($i=0; $i < @b; $i++){ Abdulaziz>print $b[$i]; Abdulaziz> } Or even simpler: foreach (@b) { print $_; } Or as we'd write it:

Re: RegExp

2001-06-30 Thread Jeff 'japhy' Pinyan
On Jun 30, Morgan said: >I need to match some parts if a document. and store it in variables so >I can send the matching string into more than one new file. >while (<>) { >$pub =~ if (//i .. /<\/pub>/i ) >} I think what you want to do here is: while (<>) { print if m!!i .. m!!i; } (Pr

Re: RegExp

2001-06-30 Thread Abdulaziz Ghuloum
Hello, Where did you come up with $pub =~ if (//i .. /<\/pub>/i ) I guess you want to get the sting between the tags, but that's not how it's done. You can do push @pub, m#(.*?)#g; #it's better with an array but that would break if you have the and on separate lines. Basica

Re: How is this doing what I want it too?

2001-06-30 Thread Abdulaziz Ghuloum
You seem to be doing everything correctly except for the "for" loop as you've thought. You have: for($i=0; !!$b[$i]; $i++){ print STDOUT $b[$i]; } What you need instead is to say: for($i=0; $i < @b; $i++){ print $b[$i]; } Remember, @b is evaluated in scalar context (@b = number of elemen

RegExp

2001-06-30 Thread Morgan
Hi Can someone help me out with a simple question? I need to match some parts if a document. and store it in variables so I can send the matching string into more than one new file. RegExp while (<>) { $pub =~ if (//i .. /<\/pub>/i ) # or is it better with an array

Re: How is this doing what I want it too?

2001-06-30 Thread M.W. Koskamp
> > for ($i=0; $b[$i] != undef; $i++) > { > print STDOUT $b[$i]; > } > > and that seem logical but I was getting complaints such as.. > "Argument "#stopped at 867\n" isn't numeric in ne at ./page57_1.pl line > 9, chunk 1544." > > anyhow hope you can enlighten me as to all this hullaballooo ;-)

Re: How is this doing what I want it too?

2001-06-30 Thread Me
[note: for some reason, your perl script came through (at least on my email client) as an attachment. if you can stop that happening, that would be nice.] - > for ($i=0; $b[$i] != undef; $i++) != is a numeric comparison. Line 1544 of list is: #stopped at 867 and in perl's boo