Rick Welykochy wrote:
Peter Abbott wrote:
if ( $_ =~ m/^Box(\d) ([A-Z]+(\. | ?)[A-Z]* ?[A-Z]*).*?(\d).*?(\d\d\.\d
\d).*?(\d*\.\d\d)L/) {
$box, = $1;
$name = $2;
$place = $4;
$time = $5;
$margin = $6;
$name =~ s/\.//;
}
Please write
On Wed, Apr 02, 2008 at 03:09:44PM +1100, Peter Abbott wrote:
Can anyone with greater knowledge than myself explain this regex
behaviour.
[ ... ]
if ( $_ =~ m/^Box(\d) ([A-Z]+(\. | ?)[A-Z]* ?[A-Z]*).*?(\d).*?(\d\d\.\d
\d).*?(\d*\.\d\d)L/) {
$box = $1;
$name =
Can anyone with greater knowledge than myself explain this regex
behaviour.
This code segment works as intended:
if ( $_ =~ m/^Box(\d) ([A-Z]+(\. | ?)[A-Z]* ?[A-Z]*).*?(\d).*?(\d\d\.\d
\d).*?(\d*\.\d\d)L/) {
$box = $1;
$name = $2;
$place = $4;
On Wed, Apr 2, 2008 at 3:09 PM, Peter Abbott [EMAIL PROTECTED] wrote:
Can anyone with greater knowledge than myself explain this regex
behaviour.
This code segment works as intended:
if ( $_ =~ m/^Box(\d) ([A-Z]+(\. | ?)[A-Z]* ?[A-Z]*).*?(\d).*?(\d\d\.\d
\d).*?(\d*\.\d\d)L/) {
On Wed, Apr 2, 2008 at 1:09 AM, Peter Abbott [EMAIL PROTECTED]
wrote:
[..snip..]
if ( $_ =~ m/^Box(\d) ([A-Z]+(\. | ?)[A-Z]* ?[A-Z]*).*?(\d).*?(\d\d\.\d
\d).*?(\d*\.\d\d)L/) {
$box = $1;
$name = $2;
$name =~ s/\.//;
$place = $4;
Thanks to all who replied. I am the wiser now.
-
Regards,
Peter.
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Peter Abbott wrote:
if ( $_ =~ m/^Box(\d) ([A-Z]+(\. | ?)[A-Z]* ?[A-Z]*).*?(\d).*?(\d\d\.\d
\d).*?(\d*\.\d\d)L/) {
$box = $1;
$name = $2;
$place = $4;
$time = $5;
$margin = $6;
$name =~ s/\.//;
Quick question
How can I do this
print This is the value .$x-SomeFunc();
as
print This is the value $x-SomeFunc();
seems like the substition stops at the - on the second line
Alex
signature.asc
Description: Digital signature
--
SLUG - Sydney Linux User's Group Mailing List -
Alexander Samad wrote:
Quick question
How can I do this
print This is the value .$x-SomeFunc();
as
print This is the value $x-SomeFunc();
You can go:
print This is the value @{[$x-SomeFunc()]};
But are you sure you want to do that? ;)
Mick.
--
SLUG - Sydney Linux User's Group Mailing
Hi All,
OK this is a perl Q not Linux but it's Sunday night. :-)
Am having probs opening several files in a perl script using indirect
filehandles.
#!/usr/bin/perl -w
# This script reads the ASF's Apache log files and extracts
Michael Lake was once rumoured to have said:
Hi All,
OK this is a perl Q not Linux but it's Sunday night. :-)
Am having probs opening several files in a perl script using indirect
filehandles.
[Snip]
foreach $user (@users)
{
$fh = new FileHandle " $user";
$fhUser =
Crossfire was once rumoured to have said:
But given what it looks like you're trying to do, you probably want to
keep many filehandles open at once.. [one for each user], you probably
want a construct like:
my %userfh;
foreach my $user (@users) {
$userfh[$user] = new FileHandle "
12 matches
Mail list logo