Is there any easy way to add two characters to the start of each item in a
list.
I have a list, for example, containing "ID" as the first element, and
"PRICE" as the second element. (The quotes are not actually stored in the
element.)
What I need the list to become like is as though it was set up the same as
typing:
@ary = (\$ID,\$PRICE);
So, I need to add a \ and $ to the start of each item.
I know I could do this by stepping through the list and joining it onto
"\\$" and then pushing it back in to another list. However, this seems a
little bit over complicated. Surely, Perl has a trick up its sleeve -
maybe a substitution of some sort.
Any ideas of a simpler method would be greatly appreciated.
Cheers,
Roland
The information contained within this e-mail sent by Cradley Print Ltd. is
confidential and is intended for the named recipient only. If you are not
the intended recipient please notify us by telephone immediately on 01384
414100 (UK)or +(44)1384 414100 (International) or return it to us by e-mail
quoting the name of the sender and the addressee. Please then delete it from
your system.
Encryption and Viruses
==================
Please note that this e-mail and any attachments have not been encrypted.
They may therefore be liable to be compromised. Please also note that it is
your responsibility to scan this e-mail and any attachments for viruses.
Viruses and compromises of security are inherent risks in relation to
e-mail.
We do not, to the extent permitted by law, accept any liability (whether in
contract, negligence or otherwise) for any virus infection and/or external
compromise of security and/or confidentiality in relation to transmissions
sent by e-mail.
Contracts
========
Please note, that contracts may NOT be concluded on behalf of Cradley Print
Ltd by e-mail, but contracts on behalf of our clients may be concluded by
e-mail.
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl