Hi List , I have this to print:
1
2
3
with this script but it didn't work:
#!/usr/bin/perl
use strict;
use warnings;
{
local $/;
my $file = ;
while ($file =~ /^\s+(\d+).(.+)$/) {
print $1\n if $2 =~ /extractStat/;
}
}
__DATA__
?tatID Jour
Hi, i have this:
open INFILE, "< $_Globals{SYSLOG}" or die $!;
#ModifiedFile();
while () {
if (/([0-9a-z:]+)\s*via eth0)/) {
$_Globals{MAC_ADDR} = $1;
}
}
And my file is like this:
.
LOG_INFO : BOOTREQUEST from 00:80:9f:2e:0f:9c via eth0
.
On May 14, Jorge Goncalvez said:
>SceInfGuest = "Guest"
>my $HISEFILE= "c:/hisecdc.inf";
> open HISE,"< $HISEFILE"
> or die "je ne peux ouvrir $HISEFILE :$!";
>while () {
> if (/SceInfGuest\s+:\s([0-9a-z]+);/i) {
>print "found $1 \n";
>
> }
>}
Hi, I have a file like this:
...
SceInfEveryone = "Everyone"
SceInfGuests = "Guests"
SceInfGuest = "Guest"
SceInfPowerUsers = "Power Users"
SceInfPrintOp = "Print Operators"
..
And I wanted to extract Guest (without the quotes)i tried this:
my $HISEFILE= "c:/hisecdc.inf";
ope
on Fri, 26 Apr 2002 09:05:29 GMT, [EMAIL PROTECTED] (Jorge
Goncalvez) wrote:
> And I wanted to match what is between from and filename ie
> 192.40.54.42 and what comes after filemane ie
With a dataline in $_:
print "$1 $2\n" if /.*from ([\d\.]+) filename ([^ ]+)/;
--
felix
--
To un
HI, I have a file like this:
.
1015322638: in.tftpd : Win32 Process Id = 0xBF : Cygwin Process Id = 0xBF : RRQ
from 192.40.54.42 filename /bootp/linux/4.0/alize/initrd.img (in.tftpd)
..
And I wanted to match what is between from and filename ie 192.40.54.42 and what
comes after filema
hi, i have this:
my ($Path) = $MountsPath =~ /(.+?)cygwin/;
but I wanted to get rid of the "/".
because $MountsPath could be c:/cygwin or c:/xyz/cygwin or c:/xyz/zyx/cygwin and
i wanted $Path = c: or c:/xyz or c:/xyz/zyx .
And now $Path= c:/ or c:/xyz or c:/xyz/zyx.
How can I do ?
thanks.
--
T