Hi Christopher.

Don't know about a WWW mirror, but here's my solution to your problem.

    my @data = qw(L54 L61 dKa dRz);

    foreach (@data)
    {
        my ($prefix, $value) = m/(.)(.+)/;

        print "Prefix: $prefix\n";
        print "Value:  $value\n";
        print "\n";
    }

Sorry this is so brief, but I have to leave for home now. If you need me to I'll
explain how it works in an hour or so when I get home... :)

Cheers,

Rob


> -----Original Message-----
> From: Christopher Fisk [mailto:[EMAIL PROTECTED]]
> Sent: 04 September 2001 19:21
> To: [EMAIL PROTECTED]
> Subject: Doing some text parsing
>
>
> Hello,
>
> This is my first message to [EMAIL PROTECTED] so I'm not completely sure
> of the proper method of asking questions.
>
> First:  Is there a web-based archive of this list?  If So where?
> Second: I'm trying to parse some text for a decoding program.  How would I
> decode something based on the first letter on a variable in an array?
>
> So if there was L54, L61, dKa, and dRz in an array how could I check the
> first letter, then chop it off and use the extra data after that letter?
>
> The L in L54 would tell me what the data actually means, but the 54 is the
> part of that data I need to file based on the L it was attached too.
>
> If my explantion of what I need to do is too confusing please let me know.
>
> Any help is appreciated.
>
> Thanks,
>
> Christopher Fisk


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to