Re: Hidden fields problem

2006-12-27 Thread Earthlink-ryanremax
Mary wrote: Hi all, As usual, I am having trouble with hidden fields. Here is the simplest example from my code which is not working: if ($tmp_perm eq 'prm_'){ my $oldFieldName = old_$fieldName; print hidden (-name = $oldFieldName, -value = $fieldValue, -default = $fieldValue-override =

Re: HoA building

2006-12-27 Thread John W. Krahn
M. Lewis wrote: I have the following simple script. I'm toying with HoA for the first time. The script is not working as expected and I know why it's not working. Each time a $HoA{$prod} is read, the $flavor is replaced with the new value. It would seem that I need to push the $flavor onto

RE: HoA building

2006-12-27 Thread zhao_bingfeng
-Original Message- From: M. Lewis [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 27, 2006 3:36 PM To: beginners@perl.org Subject: HoA building I have the following simple script. I'm toying with HoA for the first time. The script is not working as expected and I know why

Re: Regular Expression and file editing.

2006-12-27 Thread Goksie
Mumia W. wrote: On 12/25/2006 11:51 AM, Goksie wrote: [...] If i run the script, the changes could not be effected bcos the files is a readonly file. I will be glad if someone can put me true goksie You probably want a mode of + to open the file read-write. perldoc -f open when i

better way to skip first few lines of file read?

2006-12-27 Thread Alan Campbell
hello folks, I'm parsing a file that's 1+ lines long. Since sometimes it can be 10x that size I'm doing line by line parsing as opposed to array slurp. The first 4 lines are gobbldygook and need to be skipped. Currently I'm doing... while (my $line = TRACECSV) { next unless ($.

Re: better way to skip first few lines of file read?

2006-12-27 Thread Dr.Ruud
Alan Campbell schreef: The first 4 lines are gobbldygook and need to be skipped. Currently I'm doing... while (my $line = TRACECSV) { next unless ($. 4); # only do work if on 4th line but on a 1 line file thats 9996 wasted operations. #!/usr/bin/perl use strict;

Re: better way to skip first few lines of file read?

2006-12-27 Thread Ricardo SIGNES
* Dr.Ruud [EMAIL PROTECTED] [2006-12-27T13:27:49] $TRACECSV while $. = 4; $. is not well-known to many Perl programmers. $TRACECSV for 1 .. 4; -- rjbs -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

1, random; 2, unicode

2006-12-27 Thread Adriano Allora
hi to all, two questions: 1) I need to extract a random item from an hash, does exist a function to do it? A module? An implementable and not-too-much-slow flowchart? 2) How to use unicode with perl? If I write cos'รจ in a string and then I print in the stdout that sring, I read cos'? Is

Hidden fields problem

2006-12-27 Thread Mary Anderson
Hi all, As usual, I am having trouble with hidden fields. Here is the simplest example from my code which is not working: if ($tmp_perm eq 'prm_'){ my $oldFieldName = old_$fieldName;

Re: Regular Expression and file editing.

2006-12-27 Thread Owen
On Wed, 27 Dec 2006 15:17:15 +0100 Goksie [EMAIL PROTECTED] wrote: Mumia W. wrote: On 12/25/2006 11:51 AM, Goksie wrote: [...] If i run the script, the changes could not be effected bcos the files is a readonly file. I will be glad if someone can put me true goksie You

Re: what's your most favourite feature of perl?

2006-12-27 Thread Jenda Krynicky
What's your most favourite feature of your girlfriend? I think both questions are silly. I like Perl because it's Perl and I like ... oh wait, she's not ... anyway. Just like poets can go to great lengths describing their loved ones, we could all babble for hours about CPAN, regexp support,

Re: HoA building

2006-12-27 Thread M. Lewis
Thanks John and Zhao, John W. Krahn wrote: M. Lewis wrote: I have the following simple script. I'm toying with HoA for the first time. The script is not working as expected and I know why it's not working. Each time a $HoA{$prod} is read, the $flavor is replaced with the new value. It would

RE: 1, random; 2, unicode

2006-12-27 Thread zhao_bingfeng
-Original Message- From: Adriano Allora [mailto:[EMAIL PROTECTED] Sent: Thursday, December 28, 2006 3:24 AM To: beginners@perl.org Subject: 1, random; 2, unicode hi to all, two questions: 1) I need to extract a random item from an hash, does exist a function to do it? A

Re: HoA building

2006-12-27 Thread John W. Krahn
M. Lewis wrote: John W. Krahn wrote: M. Lewis wrote: my ($prod, $flavor) = split /\s/, $ln, 2; You probably should use ' ' instead of /\s/ as the first argument to split: my ($prod, $flavor) = split ' ', $ln, 2; Ok, but why? Are they not the same? No. $ perl -le' my $ln =

Re: HoA building

2006-12-27 Thread Chad Perrin
On Wed, Dec 27, 2006 at 07:42:59PM -0500, M. Lewis wrote: John W. Krahn wrote: M. Lewis wrote: while (my $ln = DATA){ chomp $ln; my ($prod, $flavor) = split /\s/, $ln, 2; You probably should use ' ' instead of /\s/ as the first argument to split: my ($prod, $flavor) =

Re: Regular Expression and file editing.

2006-12-27 Thread Mumia W.
On 12/27/2006 08:17 AM, Goksie wrote: Mumia W. wrote: On 12/25/2006 11:51 AM, Goksie wrote: [...] If i run the script, the changes could not be effected bcos the files is a readonly file. I will be glad if someone can put me true goksie You probably want a mode of + to open the file

Re: HoA building

2006-12-27 Thread M. Lewis
John W. Krahn wrote: my ($prod, $flavor) = split /\s/, $ln, 2; You probably should use ' ' instead of /\s/ as the first argument to split: my ($prod, $flavor) = split ' ', $ln, 2; Ok, but why? Are they not the same? No. $ perl -le' my $ln = one two three four ; print map

Re: HoA building

2006-12-27 Thread Chad Perrin
On Wed, Dec 27, 2006 at 10:58:40PM -0700, Chad Perrin wrote: On Wed, Dec 27, 2006 at 07:42:59PM -0500, M. Lewis wrote: John W. Krahn wrote: M. Lewis wrote: while (my $ln = DATA){ chomp $ln; my ($prod, $flavor) = split /\s/, $ln, 2; You probably should use ' ' instead of

Strange problem with glob

2006-12-27 Thread Madhur Kashyap
Hi there, Have a look at these two different implementations. IMPL2 works somehow. The problem I am facing is that the glob $pat does not return any value in IMPL1 but it returns in IMPL2. Can somebody tell what could be the problem. I have also tried including the advanced glob module using

click_button gives error on a existing button

2006-12-27 Thread Tatiana Lloret Iglesias
Hi! I'm executing this perl and I get an error in this line_ $browser2-click_button( value = Next 25 records); but i dont understand why because Next 25 records button exists!! Can you help me with this please? You can download the script from: http://tlloreti.googlepages.com/pct3.pl Thanks a

click_button gives error on a existing button

2006-12-27 Thread Tatiana Lloret Iglesias
Hi! I'm executing this perl and I get an error in this line_ $browser2-click_button( value = Next 25 records); but i dont understand why because Next 25 records button exists!! Can you help me with this please? You can download the script from: http://tlloreti.googlepages.com/pct3.pl Thanks a