[thelist] Perl: Writing to file not working......
Martin
martin at members.evolt.org
Fri Aug 10 02:21:54 CDT 2001
Matthew Brooks wrote on 10/8/01 7:59 am
>> ($new_email) = split(/\|/, $logemailfile);
>
>is trying to put multiple variables (produced by split) into a single
>variable, which won't work.
Yup, you'd need an array:
@emails = split(/\|/, $logemailfile);
<tip type='Perl associative arrays')
A nice way to check if a specific string is an array member is
to convert it to an associative array, where the keys are the
members of the initial array. Then you check for the exisitence
of a given key - if it exists, then your specific string was an
array member.
But remember case sensitivity...
</tip>
_______________________________________________
email: martin at easyweb.co.uk PGP ID: 0xA835CCCB
martin at members.evolt.org snailmail: 30 Shandon Place
tel: +44 (0)774 063 9985 Edinburgh,
url: http://www.easyweb.co.uk Scotland
More information about the thelist
mailing list