[EMAIL PROTECTED] wrote:
Hello guys ,
I am struggling to understand a small problem that I have with arrays.
[snip]
The only difference between this two pieces of code is that in one case
I call Uidl without parameters and in the other case with a mail message
number.
>
In the first case in the
On Fri, 26 Sep 2003, Michael D. Smith wrote:
>
>
> > This is perl, arrays start at zero, get used to it.
>
> Right :)
>
> And to perl you could add C, and it's offspring C++, and Fortran and COBOL
> and JAVA(Script) and... I didn't even know there was one that didn't. I
> know nothing of pascal b
> This is perl, arrays start at zero, get used to it.
Right :)
And to perl you could add C, and it's offspring C++, and Fortran and COBOL
and JAVA(Script) and... I didn't even know there was one that didn't. I
know nothing of pascal but I believe:) pascal only offers the option of
starting w
The book says stay away from this, so I never messed with it (until now for
this test) but...
$[ = 1;
will change the first element of the array to one. On my box it actually
loads the first value read into both subscript zero and one, but accessing
the array starting from one would get the wh
Carl -
'Not hardly' .Take a second look at the code.
Roughly -
opendir
@array = readdir
push(@array2,'',@array)
Now @array2 has just what he wants - a list of directories that starts
in position 1.
KenMc
Carl Jolley wrote:
>
> On Thu, 25 Sep 2003, Ken McNamara wrote:
>
> > Use opendir,
On Fri, 26 Sep 2003 [EMAIL PROTECTED] wrote:
>
> Hai,
>
> can any one tell how to pick up a particular pattern of files into that
> array...
>
> Eg:- files with extension .pl or .cfg
>
@selected=grep{ /\.(?:pl|cfg)$/ } <*.*>;
[EMAIL PROTECTED]
All opinions are my own and not necessari
On Thu, 25 Sep 2003, Ken McNamara wrote:
> Use opendir, readdir - if $array[0] is really a problem then do
> push(@array2,'',@array) - which will leave a null entry in the
> $array2{0] slot.
>
>
> "Wong, Danny H." wrote:
> >
> > Hi all,
> > I was wondering if I can start adding elements in
On Thu, 25 Sep 2003, Wong, Danny H. wrote:
> Hi all,
> I was wondering if I can start adding elements into an array
> starting at 1? Here is what I am trying to do. I'm trying to glob all
> files/folders in a directory and assign it to an array, but it start at
> subscript 0. I know I can do
[EMAIL PROTECTED] wrote:
> Hai,
>
> can any one tell how to pick up a particular pattern of files into that
> array...
>
> Eg:- files with extension .pl or .cfg
grep or a RegEx in a readdir loop.
--
,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED]
(_/ / )// //
@files = glob("*.cfg") would do.
Thanks,
-> janardhan.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Friday, September 26, 2003 10:03 AM
To: [EMAIL PROTECTED]
Cc: Wong, Danny H.; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: Array question
[EMAIL PROTECTED]<[EMAIL PROTECTED]>
eState.com cc:
S
Wong, Danny H. wrote:
Hi all,
I was wondering if I can start adding elements into an array
starting at 1? Here is what I am trying to do. I'm trying to glob all
files/folders in a directory and assign it to an array, but it start at
subscript 0. I know I can do a loop and start the subscrip
On approximately 9/25/2003 5:18 PM, came the following characters from
the keyboard of Wong, Danny H.:
Hi all,
I was wondering if I can start adding elements into an array
starting at 1? Here is what I am trying to do. I'm trying to glob all
files/folders in a directory and assign it to an
riginal Message-
> From: Carl Campbell [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 15, 2001 5:53 PM
> To: 'Peter Eisengrein'
> Subject: RE: @array question
>
>
> To insert items in an array (and in your example, you imply a sorted array),
> you can ju
On Mon, 15 Jan 2001, Peter Eisengrein wrote:
> Hi gang,
>
> Is there an easy way to insert an array item when the size of the array is
> unknown? For example, lets say I have
>
> @array = (0, 1, 2, 3, 5, 6);
>
> That is to say, I have:
> $array[0] = 0;
> $array[1] = 1;
> $array[2] = 2;
> $arr
On Mon, 15 Jan 2001, Peter Eisengrein wrote:
> Came up with a solution (see below for example), so I guess the question is
> whether there is a built-in function that does this a bit easier?
>
>
> @array = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
>
> print "What should I insert? ";
> chomp($what=);
16 matches
Mail list logo