Michael Alipio wrote:
> Hi,
Hello,
[ snip ]
> Now, my goal is to adapt that code, particularly
> obtaining only Start, IP, User. However, those three
> targets are not anymore located at the beginning of a
> line.
>
> "Start" is the date=.time= combination,
> "IP" is found after rem_ip=
> "User
Hi,
There was this example given to me:
while ( ) {
my %extr = (
Start => '',
IP=> '',
User => '',
End => '',
/^(Start|IP|User|End)=(.+)/mg
);
print "Start:$extr{Start} IP:$extr{IP}
User:$extr{User} End:$extr{End}\n\n";
}
Readin
On 10/03/2006 11:37 AM, Derek B. Smith wrote:
returns "true" or "false" (1 or '') and in list
context it returns the
contents of any capturing parentheses in the
pattern.
The expression:
( $ptypeline =~ /movable.+(sine|geo|radial|ortho)/i
)[ 0 ]
is a list slice so the regular expression is in
Umm... So would this do what I want also?
($ptype)=($projection =~ /movable.+(sine|geo|radial|ortho)/i)
or $ptype="(missing)";
I think the correct is:
$ptype = ($projection =~ /movable.+(sine|geo|radial|ortho)/i) ||
"(missing)";
'||' will be tight with ( $projection =~ ... )
> Bryan R Harris wrote:
>>
returns "true" or "false" (1 or '') and in list context it returns the
contents of any capturing parentheses in the pattern.
The expression:
( $ptypeline =~ /movable.+(sine|geo|radial|ortho)/i
)[ 0 ]
is a list slice so the
Bryan R Harris wrote:
>
>>>returns "true" or "false" (1 or '') and in list context it returns the
>>>contents of any capturing parentheses in the pattern.
>>>
>>>The expression:
>>>
>>>( $ptypeline =~ /movable.+(sine|geo|radial|ortho)/i
>>>)[ 0 ]
>>>
>>>is a list slice so the regular expression is
>> returns "true" or "false" (1 or '') and in list context it returns the
>> contents of any capturing parentheses in the pattern.
>>
>> The expression:
>>
>> ( $ptypeline =~ /movable.+(sine|geo|radial|ortho)/i
>> )[ 0 ]
>>
>> is a list slice so the regular expression is in list context but th
> returns "true" or "false" (1 or '') and in list
> context it returns the
> contents of any capturing parentheses in the
> pattern.
>
> The expression:
>
> ( $ptypeline =~ /movable.+(sine|geo|radial|ortho)/i
> )[ 0 ]
>
> is a list slice so the regular expression is in list
> context but the sl
> Jen Spinney wrote:
>> On 10/2/06, Mumia W. <[EMAIL PROTECTED]> wrote:
>>>
>>> Yes, and here is another way:
>>>
>>> $ptype = (($ptypeline =~ /movable.+(sine|geo|radial|ortho)/i)[0]) ||
>>> '(missing)';
>>
>> How does that way work? I was curious, so I tested it myself and it
>> clearly did
Dear Users
I work on debian testing with perl 5.8.8. If I try to install the module
Image::Imlib2 to install (perl -MCPAN -e shell / install Image::Imlib2)
then after a few downloads, I see this error-message:
-- snip --
Warning: this distribution contains XS files, but Module::Build is not
conf
Michael Alipio wrote:
>
> My Log file looks like this:
> Each session contains at most four lines and then it
> is separated by newline. I need to grab each session
> and put each key/value pair in hash.
>
>
> Start=2006-10-03.09:09:51
> IP=192.168.0.14
> User=alex
> End=2006-10-03.09:14:10
>
> St
Else try This..
#!/usr/local/bin/perl
use strict;
my $string = "Theres more than 1 way to do it";
if ($string =~ /\w+$/){
print "Hooray! pattern found\n";
print $&;
}
Use the inbuilt perl variables..
$` prints the pre matching part, $& gives the matched variale and $' gives the
post matching pa
Michael Alipio wrote:
>
> My Log file looks like this:
> Each session contains at most four lines and then it
> is separated by newline. I need to grab each session
> and put each key/value pair in hash.
>
>
> Start=2006-10-03.09:09:51
> IP=192.168.0.14
> User=alex
> End=2006-10-03.09:14:10
>
>
Hi I used the formula
$Y_max=(int($Y_max/8)+2)/8;
And it worked, so the Y_max is higher than the actual Y_max of the dataset
-Original Message-
From: Greg Sabino Mullane [mailto:[EMAIL PROTECTED]
Sent: Monday, October 02, 2006 8:08 PM
To: john
Cc: beginners@perl.org
Subject: Re: GD::
My Log file looks like this:
Each session contains at most four lines and then it
is separated by newline. I need to grab each session
and put each key/value pair in hash.
Start=2006-10-03.09:09:51
IP=192.168.0.14
User=alex
End=2006-10-03.09:14:10
Start=2006-10-03.09:52:12
IP=192.168.0.15
End=
15 matches
Mail list logo