-- Forwarded message --
From: Shlomi Fish shlo...@shlomifish.org
Date: Wed, May 6, 2015 at 11:31 AM
Subject: Fw: Perl array question
To: shlo...@gmail.com
Begin forwarded message:
Date: Wed, 6 May 2015 11:04:30 +0300
From: Shlomi Fish shlo...@shlomifish.org
To: beginners
Hi Vincent,
On Wed, 06 May 2015 10:07:41 +0200
Vincent Lequertier s...@riseup.net wrote:
It's a bit ugly, but here is one way to do it :
Your code encourages many bad practices. Some notes are:
#!/usr/bin/perl
no use strict;/use warnings;:
Thank you for the review, I'm learning and didn't know about this way of
using hashes :-)
---
Vincent Lequertier
s...@riseup.net
Le 2015-05-06 11:09, Shlomi Fish a écrit :
Hi Vincent,
On Wed, 06 May 2015 10:07:41 +0200
Vincent Lequertier s...@riseup.net wrote:
It's a bit ugly, but here is
It's a bit ugly, but here is one way to do it :
#!/usr/bin/perl
my @array = ('1900-0', '1900-1', 'NULL', 'NULL', '1900-2', '1900-4',
'1902-5', '1902-6', '1902-7', '1902-8');
my $num1900 = 'EARFCN=1900, PCID=';
my $num1902 = 'EARFCN=1902, PCID=';
for (@array) {
# print $_ . \n;
$num1900
Hi List
I have the following array ---
('1900-0','1900-1','NULL','NULL','1900-2','1900-4','1902-5','1902-6','1902-7','1902-8');
There are two part for each element separated by a dash.
first one known as earfcn and second one is pcid .
The requirement is For the same “earfcn”, concatenate the
On Wed, 6 May 2015 12:49:53 +0530
Anirban Adhikary anirban.adhik...@gmail.com wrote:
Hi List
I have the following array ---
('1900-0','1900-1','NULL','NULL','1900-2','1900-4','1902-5','1902-6','1902-7','1902-8');
There are two part for each element separated by a dash.
first one known as
-- Forwarded message --
From: Shlomi Fish shlo...@shlomifish.org
Date: Wed, May 6, 2015 at 11:31 AM
Subject: Fw: Perl array question
To: shlo...@gmail.com
Begin forwarded message:
Date: Wed, 6 May 2015 11:04:30 +0300
From: Shlomi Fish shlo...@shlomifish.org
To: beginners
anirban.adhik...@gmail.com (Anirban Adhikary) writes:
Hi List
I have the following array ---
('1900-0','1900-1','NULL','NULL','1900-2','1900-4','1902-5','1902-6','1902-7','1902-8');
There are two part for each element separated by a dash.
first one known as earfcn and second one is pcid .
Hello List,
I have input data such as far below:
I would like to read the data into an array and modify the 2nd index if the
0th and first indices are identical.
I would like the updated 2nd index to be an average of the 2nd index where
both occurences of 0th and 1st indices match.
So for
Hi Chris,
On Sun, 19 Aug 2012 08:49:25 -0500
Chris Stinemetz perlqu...@gmail.com wrote:
Hello List,
I have input data such as far below:
I would like to read the data into an array and modify the 2nd index
if the 0th and first indices are identical.
I would like the updated 2nd index to
Chris Stinemetz wrote in message news
Hello List,
I have input data such as far below:
I would like to read the data into an array and modify the 2nd index if the
0th and first indices are identical.
I would like the updated 2nd index to be an average of the 2nd index where
both occurences of
Chris Charley wrote in message
Chris Stinemetz wrote in message news
Hello List,
I have input data such as far below:
I would like to read the data into an array and modify the 2nd index if
the
0th and first indices are identical.
I would like the updated 2nd index to be an average of
I'm trying to add a object to an array of objects. The code below is wrong.
sub add_widget
{
my $self = shift;
my $new_widget = shift;
push ( @($self-{WIDGETS}), $new_widget );
}
Later, I'm going to need to iterate over the array of widgets. How can I
accomplish these 2 tasks?
On 03/09/2011 12:22, Ron Weidner wrote:
I'm trying to add a object to an array of objects. The code below is
wrong.
sub add_widget
{
my $self = shift;
my $new_widget = shift;
push ( @($self-{WIDGETS}), $new_widget );
}
Hi Ron
You probably want
push @{$self-{WIDGETS}},
I have a below program and I am not doing it right.
Currently, only last ip pool is going in since I am putting them w/ key to
values(so only last one shows up when I print).
How can I aggregate and assign them to server_1 so that when I print below
will show up?
server_1
10.1.1.1
10.1.1.2
I am not sure if I am still in mailing list. so cc'ing myself.
On Mon, Feb 28, 2011 at 2:47 PM, steve park rich.j...@gmail.com wrote:
I have a below program and I am not doing it right.
Currently, only last ip pool is going in since I am putting them w/ key to
values(so only last one shows
Hi Steve,
On Monday 28 Feb 2011 21:47:30 steve park wrote:
I have a below program and I am not doing it right.
Is this the complete program?
Currently, only last ip pool is going in since I am putting them w/ key to
values(so only last one shows up when I print).
OK. Have you localised a
On Mon, Feb 28, 2011 at 02:47:30PM -0500, steve park wrote:
Hello,
A couple of things in addition to what Shlomi had already mentioned.
First, you must check your regex. It doesn't really match what you have
mentioned in the __DATA__ section.
Next, doing join('', ...) is just a verbose way of
On 2/28/11 Mon Feb 28, 2011 11:47 AM, steve park rich.j...@gmail.com
scribbled:
I have a below program and I am not doing it right.
Currently, only last ip pool is going in since I am putting them w/ key to
values(so only last one shows up when I print).
How can I aggregate and assign
On 28/02/2011 19:56, steve park wrote:
I have a below program and I am not doing it right. Currently, only
last ip pool is going in since I am putting them w/ key to values(so
only last one shows up when I print).
How can I aggregate and assign them to server_1 so that when I print
below
On Feb 28, 2:47 pm, rich.j...@gmail.com (steve park) wrote:
I have a below program and I am not doing it right.
Currently, only last ip pool is going in since I am putting them w/ key to
values(so only last one shows up when I print).
Hello Steve,
The reason you only get the last value for
At 22:33 + 28/02/2011, Rob Dixon wrote:
The complete program is below.
HTH,
Rob
use strict;
use warnings;
my %HoA;
while ( DATA ) {
my ($swit, $server, $ip_range) = split;
my ($b_real_ip, $b_ip, $e_ip) = $ip_range =~
/(\d+\.\d+\.\d+\.)(\d+)-\1(\d+)/;
for my $byte ($b_ip ..
于 2010-12-15 1:38, Jim Gibson 写道:
or the File::Find module to find files without resorting
to the use of separate processes and shell commands.
Me second.
File::Find is your friend.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail:
or the File::Find module to find files without resorting
to the use of separate processes and shell commands.
Me second.
File::Find is your friend.
Also, since you seem to be familiar with find use find2perl and you barely
have to lift a finger. Its like training wheels for File::Find -
I am assigning a number of elements to an array like so:
my @new = `find /home/*/new -cmin 1 -type f`;
That works fine. I would also like to append more lines to that array
from here:
find /home/*/filed -cmin 1 -type f
How do I do that without losing whats in the array already?
--
To
On 12/14/10 Tue Dec 14, 2010 9:18 AM, Matt lm7...@gmail.com scribbled:
I am assigning a number of elements to an array like so:
my @new = `find /home/*/new -cmin 1 -type f`;
That works fine. I would also like to append more lines to that array
from here:
find /home/*/filed -cmin 1
Matt wrote:
I am assigning a number of elements to an array like so:
my @new = `find /home/*/new -cmin 1 -type f`;
That works fine. I would also like to append more lines to that array
from here:
find /home/*/filed -cmin 1 -type f
How do I do that without losing whats in the array already?
Hi,
Here is my problem;
I have a series of arrays with 0s and 1s. here is an example: (1, 0, 1, 1).
I need to parse through this series of arrays and extract the index of the
0s in the array.
Is there any quick way of doing this?
TIA,
Anjan
--
=
anjan purkayastha, phd
On Mon, Mar 30, 2009 at 2:20 PM, ANJAN PURKAYASTHA
anjan.purkayas...@gmail.com wrote:
Hi,
Here is my problem;
I have a series of arrays with 0s and 1s. here is an example: (1, 0, 1, 1).
I need to parse through this series of arrays and extract the index of the
0s in the array.
Is there any
On Mon, Mar 30, 2009 at 14:20, ANJAN PURKAYASTHA
anjan.purkayas...@gmail.com wrote:
Hi,
Here is my problem;
I have a series of arrays with 0s and 1s. here is an example: (1, 0, 1, 1).
I need to parse through this series of arrays and extract the index of the
0s in the array.
Is there any
On Mon, Mar 30, 2009 at 14:28, Rodrick Brown rodrick.br...@gmail.com wrote:
snip
Millions of ways here is one:
snip
my $pos = 0;
for my $index (@arr) {
if ( $index == 0 ) {
printf (%d , $pos );
}
$pos++;
}
snip
If you are going to go with a full bore for loop, you might as well
ANJAN PURKAYASTHA wrote:
Hi,
Hello,
Here is my problem;
I have a series of arrays with 0s and 1s. here is an example: (1, 0, 1, 1).
I need to parse through this series of arrays and extract the index of the
0s in the array.
Is there any quick way of doing this?
$ perl -le'
my @array = ( 1,
On Tue, 31 Mar 2009 04:49:17 +1000, John W. Krahn jwkr...@shaw.ca wrote:
Or instead of using arrays you could store the 1s and 0s in strings:
$ perl -le'
my $string = 10110111001;
print $-[0] while $string =~ /0/g;
'
1
4
8
9
Hi John,
Could you explain how the above code works please? I
Dave Tang wrote:
On Tue, 31 Mar 2009 04:49:17 +1000, John W. Krahn jwkr...@shaw.ca wrote:
Or instead of using arrays you could store the 1s and 0s in strings:
$ perl -le'
my $string = 10110111001;
print $-[0] while $string =~ /0/g;
'
1
4
8
9
Could you explain how the above code works
Well simple if you are not learning Perl. You guessed it, I am a
newbie.
My question is if I have an array like this, actually it is my whole
program.
my @testarray=( [5, [1,3,18,21]], [16, [1,2,3]], [21, [1]]);
print [EMAIL PROTECTED];
print [EMAIL PROTECTED];
print [EMAIL PROTECTED];
What I
[EMAIL PROTECTED] wrote:
Well simple if you are not learning Perl. You guessed it, I am a
newbie.
My question is if I have an array like this, actually it is my whole
program.
my @testarray=( [5, [1,3,18,21]], [16, [1,2,3]], [21, [1]]);
print [EMAIL PROTECTED];
print [EMAIL PROTECTED];
print
[EMAIL PROTECTED] wrote:
Well simple if you are not learning Perl. You guessed it, I am a
newbie.
My question is if I have an array like this, actually it is my whole
program.
my @testarray=( [5, [1,3,18,21]], [16, [1,2,3]], [21, [1]]);
print [EMAIL PROTECTED];
print [EMAIL PROTECTED];
print
Paul Lalli wrote:
On Feb 26, 11:07 am, [EMAIL PROTECTED] (Irfan Sayed) wrote:
Hello All,
I have two arrays contains exact no. of elements. Now what I need to do
is , I want to execute certain commands to each elements of the array at
a time.
It means that I want take first element of first
Hello All,
I have two arrays contains exact no. of elements. Now what I need to do
is , I want to execute certain commands to each elements of the array at
a time.
It means that I want take first element of first array and first element
of second array and then want to execute certain
On Tue, Feb 26, 2008 at 10:07 AM, [EMAIL PROTECTED] wrote:
Hello All,
I have two arrays contains exact no. of elements. Now what I need to do
is , I want to execute certain commands to each elements of the array at
a time.
@array1 = (1,2,3);
@array2 = (4,5,6);
for (my $i=0; $i
On Tue, Feb 26, 2008 at 8:07 AM, [EMAIL PROTECTED] wrote:
Hello All,
I have two arrays contains exact no. of elements. Now what I need to do
is , I want to execute certain commands to each elements of the array at
a time.
It means that I want take first element of first array and
On Feb 26, 11:07 am, [EMAIL PROTECTED] (Irfan Sayed) wrote:
Hello All,
I have two arrays contains exact no. of elements. Now what I need to do
is , I want to execute certain commands to each elements of the array at
a time.
It means that I want take first element of first array and first
Dear Perl users,
below is three column, vertical bar separated file. First column refers
to ID number, second designates name and the last one refers to
corresponding value. There are 8 possible names: A, B, C, D, E, F, G and
H (only first seven preset in my dataset)
1 | C | 0.404
1 | D |
Andrej Kastrin wrote:
Dear Perl users,
Hello,
below is three column, vertical bar separated file. First column refers
to ID number, second designates name and the last one refers to
corresponding value. There are 8 possible names: A, B, C, D, E, F, G and
H (only first seven preset in my
Andrej Kastrin wrote:
Dear Perl users,
below is three column, vertical bar separated file. First column refers
to ID number, second designates name and the last one refers to
corresponding value. There are 8 possible names: A, B, C, D, E, F, G and
H (only first seven preset in my dataset)
John W. Krahn wrote:
for (my $i = 0; $i @arry; $i++) {
splice (@arry, $i, 1, split (' ', $arry[$i], 1));
}
How does that populate the @new_array variable?
Mine doesn't populate @new_array. It takes the original array and
replaces it with the equivalent of everyone else's @new_array :-)
Timothy Johnson schreef:
if I had my way, I'd remove
[...] the default variable $_.
But why would you want that?
#!/usr/bin/perl
use strict;
use warnings;
sub say
{
print +(@_ ? @_ : $_), $/ ;
1
}
say for 'A' .. 'Z' ;
for ( 'a' .. 'z' ) { say } ;
for my $c ( 'A' .. 'Z' ) { say $c }
M. Kristall wrote:
John W. Krahn wrote:
for (my $i = 0; $i @arry; $i++) {
splice (@arry, $i, 1, split (' ', $arry[$i], 1));
}
How does that populate the @new_array variable?
Mine doesn't populate @new_array. It takes the original array and
replaces it with the equivalent of everyone
for (my $i = 0; $i @arry; $i++) {
splice (@arry, $i, 1, split (' ', $arry[$i], 2));
}
If one of the elements of @arry contains one two three then using 2 will
add the two elements one and two three instead of the three elements
one, two and three so you may still be left with elements
Oh, yes, a special case. I have long ago abandoned special cases since
they lead to errors. Note that `perldoc -f split` starts with:
split /PATTERN/,EXPR,LIMIT
split /PATTERN/,EXPR
split /PATTERN/
split
Note: no strings. Strings do not work well when used as the pattern for
Mr. Shawn H. Corey wrote:
On Tue, 2006-09-05 at 01:33 +0200, Paul Johnson wrote:
Um, that's not quite correct.
See `perldoc -f split` for details.
Oh, yes, a special case. I have long ago abandoned special cases since
they lead to errors. Note that `perldoc -f split` starts with:
split
On Tue, 2006-09-05 at 01:30 -0700, John W. Krahn wrote:
Anything used as a pattern is a string. See the Quote and Quote-like
Operators section of perlop:
Huh?
Do you mean all strings can be used as a pattern?
split( quotemeta( $split_string ), $data_string );
Or that patterns are built
chen li wrote:
I have an arry like this:
@arry=('AA bb','BB','CC AG')
How do I turn it into new array like this:
TMTOWTDI
@new_array=('AA','bb','BB','CC','AG')
my @new_array = split ' ', @arry;
Both line codes work perfectly:
my @new_array = map { split } @arry;
or
my @new_array =
M. Kristall wrote:
chen li wrote:
I have an arry like this:
@arry=('AA bb','BB','CC AG')
How do I turn it into new array like this:
TMTOWTDI
@new_array=('AA','bb','BB','CC','AG')
my @new_array = split ' ', @arry;
Both line codes work perfectly:
my @new_array = map { split } @arry;
Mr. Shawn H. Corey wrote:
On Tue, 2006-09-05 at 01:30 -0700, John W. Krahn wrote:
Anything used as a pattern is a string. See the Quote and Quote-like
Operators section of perlop:
Huh?
Do you mean all strings can be used as a pattern?
A pattern is a string. Perl does string interpolation
--- John W. Krahn [EMAIL PROTECTED] wrote:
Mr. Shawn H. Corey wrote:
On Tue, 2006-09-05 at 01:33 +0200, Paul Johnson
wrote:
Um, that's not quite correct.
See `perldoc -f split` for details.
Oh, yes, a special case. I have long ago abandoned
special cases since
they lead to
Mr. Shawn H. Corey schreef:
John W. Krahn:
Anything used as a pattern is a string. See the Quote and
Quote-like Operators section of perlop:
Huh?
Do you mean all strings can be used as a pattern?
split( quotemeta( $split_string ), $data_string );
Or that patterns are built from
chen li wrote:
--- John W. Krahn [EMAIL PROTECTED] wrote:
$ perl -le'
my $string = q[ a b c d ];
print join \t, map $_, split q[\s+],
qq[$string], q[4];
print join \t, map $_, split /\s+/,
$string,4;
'
a b c d
a b c d
$ perl -le'
my $w = 3;
my $x
On Tue, 2006-09-05 at 09:05 -0700, John W. Krahn wrote:
I don't understand what you are trying to say.
I saying this should work:
split '+', 'this+is+a+test';
Yes, I know how to fix it. I'm saying it _should_ work, not that it
does. If split is followed by a string, the string should be
On Tue, 2006-09-05 at 18:33 +0200, Dr.Ruud wrote:
One exception: the pattern / / does not work like the pattern ' '.
But it should, that's my point.
--
__END__
Just my 0.0002 million dollars worth,
--- Shawn
For the things we have to learn before we can do them, we learn by doing
On Tue, 2006-09-05 at 09:44 -0700, chen li wrote:
split /PATTERN/,EXPR,LIMIT
split /PATTERN/,EXPR
split /PATTERN/
split
1. I check the perldoc -f split but I am not quite
sure what EXPR really means. Does it refer to a
string, or a scalar variable contaning a string, or an
array?
Mr. Shawn H. Corey wrote:
On Tue, 2006-09-05 at 09:05 -0700, John W. Krahn wrote:
I don't understand what you are trying to say.
I saying this should work:
split '+', 'this+is+a+test';
Yes, I know how to fix it. I'm saying it _should_ work, not that it
does. If split is followed by a
On Tue, 2006-09-05 at 18:33 +0200, Dr.Ruud wrote:
One exception: the pattern / / does not work like the pattern ' '.
But it should, that's my point.
Are you proposing that the special case be removed? If so, PLEASE NO! I
use that special case in almost every script I write, and if they
On Tue, 2006-09-05 at 11:23 -0700, Bryan R Harris wrote:
Are you proposing that the special case be removed? If so, PLEASE NO! I
use that special case in almost every script I write, and if they removed it
I would probably shed tears over it.
Don't worry; they won't. Well, maybe in Perl6; I
-Original Message-
From: Bryan R Harris [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 09, 2006 11:24 AM
To: Beginners Perl
Subject: Re: array question
On Tue, 2006-09-05 at 18:33 +0200, Dr.Ruud wrote:
One exception: the pattern / / does not work like the pattern ' '.
But it should
On Tue, 2006-09-05 at 11:52 -0700, Timothy Johnson wrote:
It's the Perl
equivalent of having to remember 'I before E except after C...'.
'.. except where it's not.'
E.g:
height
weight
sex
(OK, I included 'sex' just to get your attention.)
--
__END__
Just my 0.0002 million
Mr. Shawn H. Corey schreef:
Dr.Ruud:
One exception: the pattern / / does not work like the pattern ' '.
But it should, that's my point.
Not for / / vs. ' ', because that is a special case. It is far too late
to change the special case to undef or whatever.
I like your example that shows
On Tue, 2006-09-05 at 11:52 -0700, Timothy Johnson wrote:
It's the Perl
equivalent of having to remember 'I before E except after C...'.
'.. except where it's not.'
E.g:
height
weight
sex
(OK, I included 'sex' just to get your attention.)
On some platforms:
perl -e
On Tue, 2006-09-05 at 14:54 -0700, Bryan R Harris wrote:
Regarding Timothy's thoughts, I tend to believe perl wouldn't be as popular
if the use strict pragma defaulted to on. I don't code in C because it's
too hard to get all the little details right. Perl is very forgiving, and
for my needs
On Tue, May 09, 2006 at 11:52:26AM -0700, Timothy Johnson wrote:
As much as I would hate to make you cry, if I had my way, I'd remove
that as well as the default variable $_. It would be like the first
time you had to convert all of your scripts to use the strict pragma,
but in the end it
Hi all,
I have an arry like this:
@arry=('AA bb','BB','CC AG')
How do I turn it into new array like this:
@new_array=('AA','bb','BB','CC','AG')
Thanks,
Li
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
You could cycle through the array and use split() to split each element
by whitespace and then append the result to the @new_array array using
push();
-Original Message-
From: chen li [mailto:[EMAIL PROTECTED]
Sent: Monday, May 08, 2006 12:58 PM
To: beginners@perl.org
Subject: array
On Mon, 2006-08-05 at 12:58 -0700, chen li wrote:
Hi all,
I have an arry like this:
@arry=('AA bb','BB','CC AG')
How do I turn it into new array like this:
@new_array=('AA','bb','BB','CC','AG')
Do you mean to break the elements on whitespace?
my @new_array = map { split } @arry;
On Mon, 2006-08-05 at 22:35 +0200, Dani Pardo wrote:
On 5/8/06, Mr. Shawn H. Corey [EMAIL PROTECTED] wrote:
Do you mean to break the elements on whitespace?
my @new_array = map { split } @arry;
Sorry but, can you explain the brackets? I just don't get it. Wich is
the difference from
chen li wrote:
Hi all,
Hello,
I have an arry like this:
@arry=('AA bb','BB','CC AG')
How do I turn it into new array like this:
@new_array=('AA','bb','BB','CC','AG')
my @new_array = split ' ', @arry;
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL
I have an arry like this:
@arry=('AA bb','BB','CC AG')
How do I turn it into new array like this:
@new_array=('AA','bb','BB','CC','AG')
my @new_array = split ' ', @arry;
Both line codes work perfectly:
my @new_array = map { split } @arry;
or
my @new_array = split ' ',
On Mon, 2006-08-05 at 15:15 -0700, chen li wrote:
Both line codes work perfectly:
my @new_array = map { split } @arry;
or
my @new_array = split ' ', @arry;
The second statement will work perfectly if every element has only one
space character separating its components and has no leading or
On Mon, May 08, 2006 at 07:07:14PM -0400, Mr. Shawn H. Corey wrote:
On Mon, 2006-08-05 at 15:15 -0700, chen li wrote:
Both line codes work perfectly:
my @new_array = map { split } @arry;
or
my @new_array = split ' ', @arry;
The second statement will work perfectly if every element
Mr. Shawn H. Corey schreef:
chen li:
Both line codes work perfectly:
my @new_array = map { split } @arry;
or
my @new_array = split ' ', @arry;
The second statement will work perfectly if every element has only one
space character separating its components and has no leading or
trailing
On Tue, 2006-09-05 at 01:33 +0200, Paul Johnson wrote:
Um, that's not quite correct.
See `perldoc -f split` for details.
Oh, yes, a special case. I have long ago abandoned special cases since
they lead to errors. Note that `perldoc -f split` starts with:
split /PATTERN/,EXPR,LIMIT
Mr. Shawn H. Corey wrote:
On Mon, 2006-08-05 at 15:15 -0700, chen li wrote:
Both line codes work perfectly:
my @new_array = map { split } @arry;
or
my @new_array = split ' ', @arry;
The second statement will work perfectly if every element has only one
space character separating its
Boris Volf wrote:
Can anyone help with this
I have the following array:
1,1040209458
2,1040328655
3,1040847094
4,1041030406
5,1042093756
I need to create a script that goes through this array(@temp_array), and
creates various output files
Boris Volf wrote:
Can anyone help with this
I have the following array:
1,1040209458
2,1040328655
3,1040847094
4,1041030406
5,1042093756
I need to create a script that goes through this array(@temp_array), and
creates various output files
Can anyone help with this
I have the following array:
1,1040209458..
WRITE CONTENTS OF AN ARRAY TO OUTPUT FILES
for ($i=0; $i $num_of_files; $i++){
open(OUT,$file_$seq_num.txt);
foreach $item (@temp_array){
#
# I NEED
Can anyone help with this
I have the following array:
1,1040209458
2,1040328655
3,1040847094
4,1041030406
5,1042093756
I need to create a script that goes through this
array(@temp_array), and
creates various output files with N
Can anyone help with this
I have the following array:
1,1040209458
2,1040328655
3,1040847094
4,1041030406
5,1042093756
I need to create a script that goes through this array(@temp_array), and
creates various output files with N rows in each
PROTECTED]
Sent: Saturday, May 15, 2004 6:40 AM
Subject: Re: Array Question
Luinrandir Hernsen wrote:
Can I do something like this?
perldoc -q quoting
@CityA=Suburb1, Suburb2, Suburb3;
@CityB=Suburb1, Suburb4, Suburb5;
I don't think the above is doing what you think
Can I do something like this?
@CityA=Suburb1, Suburb2, Suburb3;
@CityB=Suburb1, Suburb4, Suburb5;
$Var=TownCurrent;
$NewVar=$($TownCurrent)[1];
I am trying to construct a sting from a variable.
make sence?
Lou
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
Chris wrote:
my %found = ();
foreach (@emails) { $found{$_}++ };
foreach (@exclude) { exists $found{$_} and delete $found{$_} }
Too complicated. Check Wolf's suggestion:
$unwanted{$_} = 1 foreach @exclude;
my @temp;
push @temp
while (my $email = shift @emails) {
push @temp, $email unless
At 07:18 PM 2/26/04 -0500, you wrote:
Hi Guys,
I have a problem with e-mail address's and an array. I have some code that
will be a documentation spider to go through all our technical
documentation, extract e-mail address's and attempt to sort and exclude
certain e-mails/patterns. All
Hi Guys,
I have a problem with e-mail address's and an array. I have some code that
will be a documentation spider to go through all our technical
documentation, extract e-mail address's and attempt to sort and exclude
certain e-mails/patterns. All documentation is in plain text, so no filters,
On Friday 27 February 2004 01:18, Chris generously enriched virtual reality by
making up this one:
Hi Guys,
I have a problem with e-mail address's and an array. I have some code that
will be a documentation spider to go through all our technical
documentation, extract e-mail address's and
Hi! I'm still wallowing in Chapter 3 (Arrays. Why can't I get it?!?!?!? ARGH!) of
Learning Perl on Win32 Systems. I'm trying to create an exercise but I'm not getting
the results that I want. Here's what I'm trying to do:
I'm asking for a list of names:
print Name your friends: ;
@names
2003 13:24
To: [EMAIL PROTECTED]
Subject: Array Question
Hi! I'm still wallowing in Chapter 3 (Arrays. Why can't I get it?!?!?!?
ARGH!) of Learning Perl on Win32 Systems. I'm trying to create an
exercise but I'm not getting the results that I want. Here's what I'm trying
to do:
I'm asking
Hi Anthony
Anthony Beaman [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi! I'm still wallowing in Chapter 3 (Arrays. Why can't I get it?!?!?!?
ARGH!) of Learning Perl on Win32 Systems. I'm trying to create an
exercise but I'm not getting the results that I want. Here's what I'm
Anthony Beaman said:
Hi! I'm still wallowing in Chapter 3 (Arrays. Why can't I get it?!?!?!?
ARGH!) of Learning Perl on Win32 Systems. I'm trying to create an
exercise but I'm not getting the results that I want. Here's what I'm
trying to do:
I'm asking for a list of names:
print
the same results that I've been getting (I know .).
-Original Message-
From: Rob Anderson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 25, 2003 9:12 AM
To: [EMAIL PROTECTED]
Subject:Re: Array
]
Sent: Wednesday, June 25, 2003 9:13 AM
To: Anthony Beaman
Cc: [EMAIL PROTECTED]
Subject:Re: Array Question
Anthony Beaman said:
Hi! I'm still wallowing in Chapter 3 (Arrays. Why can't I get
will print Wilma Betty because each enter will add a LF.
HTH
richf
-Original Message-
From: Anthony Beaman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 25, 2003 9:18 AM
To: Paul Johnson
Cc: [EMAIL PROTECTED]
Subject: RE: Array Question
I typed in 3. For example, Sam Mary Joe. I
Anthony Beaman [EMAIL PROTECTED] wrote in message ?
news:[EMAIL PROTECTED]
I typed in 3. For example, Sam Mary Joe. I expect to get I know Mary,
since she's [1] but I'm getting
a blank space. I've tried this on NT and on my 98 machine here at work.
Hmm, are you just putting spaces between your
1 - 100 of 179 matches
Mail list logo