> Toddy Prawiraharjo wrote:
> >
> > From: Rob Dixon [mailto:[EMAIL PROTECTED]
> > Sent: Friday, 29 September 2006 10:04 AM
> > To: beginners@perl.org
> > Subject: Re: Querying very big database
> >>
> >> Toddy Prawiraharjo wrote:
> >>
> >>> Hello all,
> >>>
> >>> I am not sure if i'm ins
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 work, but I hav
On 10/2/06, Mumia W. <[EMAIL PROTECTED]> wrote:
On 10/02/2006 01:54 PM, Rob Dixon wrote:
> Bryan R Harris wrote:
>>
>> **
>> $ptypeline = "#movableortProjortho0.0000.000";
>>
>> ($ptype) = ($ptypeline =~ /movable.+(sine|geo|radial|ortho
On 10/02/2006 01:54 PM, Rob Dixon wrote:
Bryan R Harris wrote:
**
$ptypeline = "#movableortProjortho0.0000.000";
($ptype) = ($ptypeline =~ /movable.+(sine|geo|radial|ortho)/i) ||
"(missing)";
print $ptype, "\n";
***
Johnson, Reginald (GTI) wrote:
> I am trying to print the contents of the array from within the hash. I
> see that I can do it by
>
> print "$name: $items[0][0] $items[0][1] $items[0][2] $items[0][3] \n "
>
> Is there a better way to accomplish this, especially if I don't know the
> number of i
I am trying to print the contents of the array from within the hash. I
see that I can do it by
print "$name: $items[0][0] $items[0][1] $items[0][2] $items[0][3] \n "
Is there a better way to accomplish this, especially if I don't know the
number of items in the array.
Here is the code:
Bryan R Harris wrote:
**
$ptypeline = "#movableortProjortho0.0000.000";
($ptype) = ($ptypeline =~ /movable.+(sine|geo|radial|ortho)/i) || "(missing)";
print $ptype, "\n";
**
The above code prints
**
$ptypeline = "#movableortProjortho0.0000.000";
($ptype) = ($ptypeline =~ /movable.+(sine|geo|radial|ortho)/i) ||
"(missing)";
print $ptype, "\n";
**
The above code prints "1", where I want it to
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Do you know how to define that all the numbers on the Y
axis should be integers?
You have to set the format of the y-axis like so:
$graph->set(y_number_format => '%d');
Where '$graph' is the GD::Graph object you previously
created via the new
Do you know how to define that all the numbers on the Y axis should be
integers?
Do you know how to define that all the numbers on the Y axis should be
integers?
On Mon, Oct 02, 2006 at 07:15:38AM -0700, Derek B. Smith wrote:
>
> For a complete understanding of scope (not listerine)
> : )
> please read the following:
> http://perl.plover.com/local.html#2_Localized_Filehandles
>
> and
> http://www.perlmonks.org/?node_id=564448
>
> Wow...opened my eyes and
Hi Charles,
At 17:18 2006-9-29, Charles K. Clarkson wrote:
Shiping Wang wrote:
: Yes, but it start @P = 0 .. 89;
I might use the any() function available in List::MoreUtils.
I try to avoid flag like the plague.
use List::MoreUtils 'any';
my @P = (
0.06, 0.04, 0.98, 0.12, 0.02, 0.
I'm trying to parse a huge (~2-5MB) Snoop dump from our servers.
The output is below:
15:44:14.57313 199.117.205.249 -> s31 TCP D=57013 S=4500 Push
Ack=4051907260 Seq=4004895749 Len=39 Win=49640
0: 0003 ba0c 272b 000c f860 a0f0 0800 4500'+..ø`E.
16: 004f
-- "Charles K. Clarkson" <[EMAIL PROTECTED]> wrote:
> John Ackley wrote:
>
>
> : while( ($service) = $SERVICE->fetchrow_array ) {
>
> According to the DBI docs:
>
>"If there are no more rows or if an error occurs,
> then fetchrow_array returns an empty list."
>
> When a value
-- Mathew Snyder <[EMAIL PROTECTED]> wrote:
> Sorry. Just had to do it. :)
>
> --
> Mathew Snyder
>
> --
It got a laugh from me!
thank you
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.c
John W. Krahn wrote:
Andrej Kastrin wrote:
Dear all,
Hello,
I'm looking for simple (and fast) solution to extract maximum value from
a hash. I search over the Perl mailing lists, but I didn't find anything
usable.
One way to do it:
my $max;
$max < $_ and $max = $_ for valu
Andrej Kastrin wrote:
> Dear all,
Hello,
> I'm looking for simple (and fast) solution to extract maximum value from
> a hash. I search over the Perl mailing lists, but I didn't find anything
> usable.
One way to do it:
my $max;
$max < $_ and $max = $_ for values %hash;
And another way:
my $m
Michael Alipio <[EMAIL PROTECTED]> asked:
> #!/usr/local/bin/perl
> use strict;
>
> my $string = "Theres more than 1 way to do it"; if ($string
> =~ /\w+$/){ print "Hooray! pattern found"; print $1; }
>
> My goal is to print the last word.
> However, it only prints "Hooray! pattern found";
>
>
It depends what do you mean by maximum.
Assume you have numerical value as hash values.
You can do:
use List::Util qw(max)
my %hash = { foo => 3, bar=>2, qux=> 1};
my $max_val = max values %hash;
Hope that helps.
--
Regards,
Edward WIJAYA
From: Andrej Kast
> #!/usr/local/bin/perl
> use strict;
>
> my $string = "Theres more than 1 way to do it"; if ($string
> =~ /\w+$/){ print "Hooray! pattern found"; print $1; }
You need to wrap the bit you wish to extract in (paremphasis) and it'll be put
into $1. If you do two (wraps), you'll get $1 and $2, and
sort values %hash?
--
Lee Goddard
Independent Contractor, Software Development/Analysis
BBC Radio & Music Interactive
* Room 718 | Henry Wood Hs | Regents St | London W1 1AA | UK * 020 776 50849 *
lee(at)server-sidesystems.ltd.uk
> -Original Message-
> From: Andrej Kastrin [mailto:[
Dear all,
I'm looking for simple (and fast) solution to extract maximum value from
a hash. I search over the Perl mailing lists, but I didn't find anything
usable.
Thanks in advance for any suggestion, Andrej
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAI
Hi,
Suppose I have this:
#!/usr/local/bin/perl
use strict;
my $string = "Theres more than 1 way to do it";
if ($string =~ /\w+$/){
print "Hooray! pattern found";
print $1;
}
My goal is to print the last word.
However, it only prints "Hooray! pattern found";
Any idea what's wrong with $1??
Tha
24 matches
Mail list logo