Re: Real new.... sub not working correctly.

2001-06-04 Thread Marcelo E. Magallon
Hi, others have explained where the problem is ($foo is the scalar foo, not the function foo), but... >> Carter and Cathleen <[EMAIL PROTECTED]> writes: > Now when I spit this through I get: > > + = x Are you sure about this output? In particular about the "x" there. Since you are doi

Re: Problem with Prematch not changing

2001-06-04 Thread Marcelo E. Magallon
>> Sebastiao Alves Barata <[EMAIL PROTECTED]> writes: > Why is $PREMATCH not changing on the seconde match? Because there's no match the second time. From perlvar(1): $PREMATCH $` The string preceding whatever was matched by the last successful pattern matc

Re: probably a simple matter but...

2001-06-04 Thread Marcelo E. Magallon
Hi, >> Brent Buckalew <[EMAIL PROTECTED]> writes: > other. What happens is that it reads in the numbers until there is a > negative number. When it reaches a negative number, it places the > remaining text in that variable. I used your regular expression but I can't reproduce the proble

Re: probably a simple matter but...

2001-06-04 Thread Marcelo E. Magallon
>> "M.W. Koskamp" <[EMAIL PROTECTED]> writes: > \s* will match any number of spaces ([0-9.\-]*) will match the > largest sequence of any character since there is a dot in the > expression. No. A '.' inside a character class is literal. -- M.

Re: testing null strings for form field values

2001-06-05 Thread Marcelo E. Magallon
>> Paul <[EMAIL PROTECTED]> writes: > > if ( $formdata{view_name} ne "" ) { > > $view = $formdata{view_name}; > > $viewtag = "1"; > > } > > For a simple boolean test, I usually find it more readable to be less > explicit in these cases: > > if ( $formdata{view_name} ) { > #

Re: Spinning Wheel!!!

2001-06-15 Thread Marcelo E. Magallon
>> "if.then.else" <[EMAIL PROTECTED]> writes: > > print "$windmill[$_ & 3]\r" and usleep(50) for 0..1; > > i'm a bit confussed with this print statement. 0..1 is a range from 0 to 1. (perlop(1), Range Operators) for (foreach) is a modifier for the statement preceding it (per

Re: Date format again

2002-03-03 Thread Marcelo E. Magallon
[ Don't Cc: me, I read this mailing list, thank you ] >> Troy May <[EMAIL PROTECTED]> writes: > ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime; > $thisday = (Sun,Mon,Tue,Wed,Thu,Fri,Sat)[(localtime) [6]]; > $s = (localtime)[0]; > $m = (localtime)[1]; > $m = ($m + 35) ;