Xavier Noria schreef:
> Detecting whether something holds in an array is the job of grep:
>
>my $numbers = grep /\A$RE{num}{real}\z/, @data;
>next unless $numbers == @data;
Alternative:
die if grep !/\A$RE{num}{real}\z/, @data;
my $numbers = scalar @data;
--
Affijn, Ruud
"Gewo
El Jul 19, 2007, a las 12:19 AM, Joseph L. Casale escribió:
Interesting,
I see from your regexp you use a \A and \z, from Perldoc this means:
\A Match only at beginning of string
\z Match only at end of string
I am not sure I understand this requirement?
^ and $ depend on flags, and
On 7/18/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote:
Chas,
Sorry but I am not clear on what you mean by reduce? Do you mean
remove all non numbers from the array?
snip
Sort of, the code doesn't modify the original array, it creates a new
array with only the values that are numbers.
--
To un
Subject: Re: Convert Scientific Notation to decimal equivalent
On 7/18/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote:
> Interesting,
> I see from your regexp you use a \A and \z, from Perldoc this means:
> \A Match only at beginning of string
> \z Match only at end of st
On 7/18/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote:
Interesting,
I see from your regexp you use a \A and \z, from Perldoc this means:
\A Match only at beginning of string
\z Match only at end of string
Is "foo10bar" valid? /^$RE{num}{real}$/ says no, but /$RE{num}{real}/
says yes
On 7/18/07, Chas Owens <[EMAIL PROTECTED]> wrote:
On 7/18/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote:
> How can I detect this, I have been running some code for a few days to
> develop some files and ran into the situation where I am getting the
> following data for input:
>
> 14.95313 14.453
Notation to decimal equivalent
El Jul 18, 2007, a las 11:19 PM, Joseph L. Casale escribió:
> How can I detect this, I have been running some code for a few days
> to develop some files and ran into the situation where I am getting
> the following data for input:
>
> 14.9
El Jul 18, 2007, a las 11:19 PM, Joseph L. Casale escribió:
How can I detect this, I have been running some code for a few days
to develop some files and ran into the situation where I am getting
the following data for input:
14.95313 14.45312 0
14.95313 1.570813E-015 0
14.95313 -14.45313
Joseph L. Casale wrote:
How can I detect this, I have been running some code for a few days to develop
some files and ran into the situation where I am getting the following data for
input:
14.95313 14.45312 0
14.95313 1.570813E-015 0
14.95313 -14.45313 0
-14.95313 -28.90625 0
-14.95313 -14.45
On 7/18/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote:
How can I detect this, I have been running some code for a few days to
develop some files and ran into the situation where I am getting the
following data for input:
14.95313 14.45312 0
14.95313 1.570813E-015 0
14.95313 -14.45313 0
-14.9531
10 matches
Mail list logo