http://qs321.pair.com?node_id=181004


in reply to How can I extract part of a string after a specific character

my $string ; my $title = 'TITLE=SPECIAL CASE 1' ; $string = $title if $title =~ s/^TITLE=// ;

Now $string is SPECIAL CASE 1. If $title didn't match, it is undef, and you can test it with a simple if ($string) {..., for example (but I would rather use if (defined $string) {...)

Ciao!
--bronto

# Another Perl edition of a song:
# The End, by The Beatles
END {
  $you->take($love) eq $you->made($love) ;
}