in reply to Re: split question
in thread split question
Using the dialectic is another way to deal with this.
-blyman#!/usr/bin/perl # Prints 'First: A', as you expect 'abcd' =~ /(a)/; print "First: ", uc $1, "\n"; # Also prints 'Second: A', though you expect it not to 'efgh' =~ /(a)/; print "Second: ", uc $1, "\n"; #==== # Prints 'Third: A' - again, as you expect 'abcd' =~ /(a)/ and print "Third: ", uc $1, "\n"; # Doesn't print anything - what you want 'efgh' =~ /(a)/ and print "Fourth: ", uc $1, "\n";
In Section
Seekers of Perl Wisdom