--- Craig Moynes/Markham/IBM <[EMAIL PROTECTED]> wrote:
> . . .
> I have a string like this:
> $string1 = "[%a %H:%M:%S %c] - - etc.etc.etc";
>
> I need to parse out all the substrings that are similar to "%x"
> (where x is any letter)
try
my @chars = $string1 =~ /%(.)/g; #:o)
You can probably even use this as a loop control if it helps:
for my $c ($string1 =~ /%(.)/g) {
print "$c\n"; # and/or whatever code you need!
}
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/