Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Perl-regularExpression: Testing for a Valid Pattern

Perl-regularExpression: Testing for a Valid Pattern
{filelink=13220}

do {
    print "Enter your pattern? ";
    chomp($pat = <>);
    eval { "" =~ /$pat/ };
       warn "Invalid pattern $@" if $@;
} while $@;

No comments yet.

Leave a Comment