On Feb 16, 9:35 am, [EMAIL PROTECTED] (Dr.Ruud) wrote:
> [EMAIL PROTECTED] schreef:
>
> > The following code won't load up the array with the hashes like it
> > does by explicitly putting them in.
>
> > [EMAIL PROTECTED] = qw \ 56 56 33 67 22 11 88 94 452 334 67 65 2 3 3 3 \;
>
> Because of the bac
Dr.Ruud wrote:
Gunnar Hjalmarsson schreef:
[EMAIL PROTECTED]:
I have data in a text file where the important thing I want
to extract is between two blank lines.
Assuming the data has been slurped into $_ :
print "$1\n" while /\n\n(.+)(?=\n\n)/g;
Or /\n[[:blank:]]*\n(.+)\n[[:blank:]]*\
On Feb 15, 2008 4:36 PM, <[EMAIL PROTECTED]> wrote:
> I'm trying to figure out how to do an Excel type sort in Perl but
> can't seem to find anything on specifically what I want to do. So here
> goes.
>
> Imagine 3 columns of numbers: A, B, C.
>
> I want to sort in descending order starting with C
On Feb 15, 2008 1:36 PM, <[EMAIL PROTECTED]> wrote:
> I'm trying to figure out how to do an Excel type sort in Perl but
> can't seem to find anything on specifically what I want to do. So here
> goes.
I think you want to sort on multiple criteria, with nothing "Excel" about it.
> Imagine 3 colu
Gunnar Hjalmarsson schreef:
> [EMAIL PROTECTED]:
>> I have data in a text
>> file where the important thing I want to extract is
>> between two blank lines.
>
> Assuming the data has been slurped into $_ :
>
> print "$1\n" while /\n\n(.+)(?=\n\n)/g;
Or /\n[[:blank:]]*\n(.+)\n[[:blank:]]*\
[EMAIL PROTECTED] schreef:
> The following code won't load up the array with the hashes like it
> does by explicitly putting them in.
>
> @crcerrs = qw \ 56 56 33 67 22 11 88 94 452 334 67 65 2 3 3 3 \;
Because of the backslash?
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-
> ""Jeff" == "Jeff Pang" <[EMAIL PROTECTED]> writes:
"Jeff> but the second one is recommended, it looks more like the OO way.
It's more than just recommended. The indirect object form is actively
discouraged, because we've been finding more and more examples where
the inherent imbiguity in i
On Feb 16, 2008 1:57 PM, <[EMAIL PROTECTED]> wrote:
> @data = (
> { crc => $crcerrs[$i], overrun => $overrunerrs[$i], inputerrs =>
> $inputerrs[$i] } );
> };
This overide the array each time.
You need a 'push' at each loop:
push @data, { };
good luck.
--
To unsubscribe, e-mail: [E
I"m trying to find a way to convert this into where I can use array
indexes as the values but it doesn't seem to work.
my @data = (
{ crc => 56, overrun => 1, inputerr => 45 },
{ crc => 56, overrun => 7, inputerr => 4 },
{ crc => 33, overrun => 7, inputerr => 4 }
)
The following code w
On Feb 15, 2008 11:56 PM, howa <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Currently I have seen two way to create objects in Perl:
>
> 1. my $a = new Apple...
> 2. my $a = Apple->new();
>
> What are the differences, and which one is recommended?
>
Both are fine:
$ perl -le 'package A;sub new{print shif
[EMAIL PROTECTED] wrote:
I've been trying to use regular expressions or some kind of counter
thing, but I can't seem to work this right. I have data in a text file
where the important thing I want to extract is between two blank
lines. That's the only systematic way to find the useful lines.
So,
On Fri, Feb 15, 2008 at 01:04:24PM -0800, [EMAIL PROTECTED] wrote:
> I've been trying to use regular expressions or some kind of counter
> thing, but I can't seem to work this right. I have data in a text file
> where the important thing I want to extract is between two blank
> lines. That's the o
I'm trying to figure out how to do an Excel type sort in Perl but
can't seem to find anything on specifically what I want to do. So here
goes.
Imagine 3 columns of numbers: A, B, C.
I want to sort in descending order starting with Column A then Column
B, and then Column C.
Thing is I don't want
I've been trying to use regular expressions or some kind of counter
thing, but I can't seem to work this right. I have data in a text file
where the important thing I want to extract is between two blank
lines. That's the only systematic way to find the useful lines.
So, it'll go "blank line, impo
Hi,
Currently I have seen two way to create objects in Perl:
1. my $a = new Apple...
2. my $a = Apple->new();
What are the differences, and which one is recommended?
Thanks.
Howard.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.
15 matches
Mail list logo