At 10:02 AM 6/12/2001 +0100, Lee Goddard wrote:
>
>> Hello,
>>
>> I have an array with value of 1-10.
>> What is the fastest way to 'reverse' the values to 10-1 (ie. 10 9 8 7 6
...)
>> any help would be appreciated.
@array = (10 9 8 7 6 5 4 3 2 1);
;-)
-
ent: Monday, June 11, 2001 1:36 PM
To: Perl-Win32-Users
Subject: 'Reversing an array'
Hello,
I have an array with value of 1-10.
What is the fastest way to 'reverse' the values to 10-1 (ie. 10 9 8 7 6 ...)
any help would be appreciated.
Roee Rubin
Irubin Con
> I have an array with value of 1-10.
>
> What is the fastest way to 'reverse' the values to 10-1 (ie. 10 9 8 7 6
...)
@array = reverse(@array);
perldoc -f reverse
http://www.google.com/search?q=how+do+i+reverse+an+array+in+perl
___
Perl-Win32-Users
> I have an array with value of 1-10.
> What is the fastest way to 'reverse' the values to 10-1 (ie. 10 9 8 7 6
...)
Use reverse...
@list = (1 .. 10);
print join " ", @list, "\n";
@list = reverse @list;
print join " ", @list, "\n";
___
Perl-Win32-User
Roee Rubin wrote:
> Hello,
>
> I have an array with value of 1-10.
>
> What is the fastest way to 'reverse' the values to 10-1 (ie.
> 10 9 8 7 6 ...)
>
> any help would be appreciated.
@list = reverse @list;
see perldoc -f reverse
___
Perl-Win32-Us
Have you tried the reverse() function?
Merrill
-Original Message-
From: Roee Rubin [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 11, 2001 1:36 PM
To: Perl-Win32-Users
Subject: 'Reversing an array'
Hello,
I have an array with value of 1-10.
What is the fastest way to
perldoc -f reverse
--Art
: -Original Message-
: From: Roee Rubin [mailto:[EMAIL PROTECTED]]
: Sent: Monday, June 11, 2001 2:36 PM
: To: Perl-Win32-Users
: Subject: 'Reversing an array'
:
:
: Hello,
:
: I have an array with value of 1-10.
:
: What is the fast
Hello,
I have an array with value of 1-10.
What is the fastest way to 'reverse' the values to 10-1 (ie. 10 9 8 7 6 ...)
any help would be appreciated.
Roee Rubin
Irubin Consulting
[EMAIL PROTECTED]
www.irubin.com
___
Perl-Win32-Users mailing list