in reply to Silly RegEx problem
#!/usr/bin/perl use strict; use warnings; while (defined( $_ = <DATA>)) { my $one = $1 if s/^(\{\w+\s+\d+\}) //; my $two = $1 if s/^(.*)//; print "ONE: $one\n"; print "TWO: $two\n"; } __DATA__ {STRING 4} 123.122.124.125 some text here
------
We are the carpenters and bricklayers of the Information Age.
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
|
|---|