On Fri, 14 Jul 2006 12:00:08 -0700, you wrote:
>I have something like this:
>
>while ()
>{
> if (// .. /<\/TAG>/)
> {
> # process line
> }
>}
>
>I got this from http://www.perl.com/pub/a/2004/06/18/variables.html.
>
>My special wrinkle is, I want to process certain sections of a file,
Craig Cardimon wrote:
> I have something like this:
>
> while ()
> {
>if (// .. /<\/TAG>/)
>{
># process line
>}
> }
>
> I got this from http://www.perl.com/pub/a/2004/06/18/variables.html.
>
> My special wrinkle is, I want to process certain sections of
> a file, but only
I have something like this:
while ()
{
if (// .. /<\/TAG>/)
{
# process line
}
}
I got this from http://www.perl.com/pub/a/2004/06/18/variables.html.
My special wrinkle is, I want to process certain sections of a file, but
only if that section passes certain criteria.
I want to
> @operators = ("\<","\<\=","\=","\!\=","\>\=","\>");
> ### lets say user chose $operators[0] (<) and it is now stored in $fOp1
>
> if ($fromTime $fOp1 $fTime);
> {
> &something();
> }
@op = qw|< <= = != >= >|;
if ( eval "$fromTime $op[0] $fTime" ) {
print `perldoc -f eval`;
}
_
Peter,
Take a look at eval.
> -Original Message-
> From: Peter Eisengrein [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 06, 2001 2:20 PM
> To: Perl-Win32-Users Mailing List (E-mail)
> Subject: operator help
>
>
> I'm trying to allow the user to sele
>I'm trying to allow the user to select an operator from an @array to
>determine if something should be done and I can't seem to figure out how
to
>do it. Consider:
>
>
>@operators = ("\<","\<\=","\=","\!\=","\>\=","\>");
>### lets say user chose $operators[0] (<) and it is now stored in $fOp1
use eval()
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
I'm trying to allow the user to select an operator from an @array to
determine if something should be done and I can't seem to figure out how to
do it. Consider:
@operators = ("\<","\<\=","\=","\!\=","\>\=","\>");
### lets say user chose $operators[0] (<) and it is now stored in $fOp1
if ($fr