APRS Perl Split
Robert Pepper
robert at peppernet.org
Thu Sep 25 14:31:51 EST 2003
> I am feeling very dumb today I need some help with this PERL code.
>
> STRING = CALLSIGN>DEST,DIGI,DIGI,DIGI:PAYLOAD
>
> I am trying to get: CALLSIGN, DEST, (digis), PAYLOAD
$string = 'CALLSIGN>DEST,DIGA,DIGB,DIGC:PAYLOAD';
print join "\n", @stuff = split (/[>,:]/, $string);
this being Perl there are many more ways to do it. Not familiar with the
structure of the data so can't recommend a best method. Suggest perusal
of regex notes as split et al is just a regex variant at heart.
hth
--
Robert
http://www.gpsvehiclenavigation.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://second.aprs.net.au/pipermail/ozaprs/attachments/20030925/8181263c/attachment.htm
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT12130.txt
Url: http://second.aprs.net.au/pipermail/ozaprs/attachments/20030925/8181263c/attachment.txt
More information about the Ozaprs
mailing list