in reply to Re: error message in the end of the array looping?
in thread error message in the end of the array looping?

This surely popped somewhere else here in PM (I kinda remember something), but I did a supersearch for $/ without finding anything applicable. Why:
print 'We have a match.', $/
instead of
print "We have a match.\n"
(apart from TIMTOWTDI)? Pointers welcome!

Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf

Don't fool yourself.

Replies are listed 'Best First'.
Re^3: error message in the end of the array looping?
by Zaxo (Archbishop) on May 30, 2006 at 10:51 UTC

    Force of habit, mainly. I usually prefer giving print a list to concatenating strings and variables first. The habit just carries over to control characters like this, too.

    I used to believe that $/ had some advantage over "\n" in platform independence, but I'm over that now.

    After Compline,
    Zaxo