KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Under use strict; use warnings; my $foo = undef; the expressions $foo . '' and "$foo" both produce Use of uninitialized value $foo in ... at ... but the following expression gives the empty string without warning: $foo x 1 Anyone knows why? I mean, it's cool to have a nice stringification idiom ( $_ x 1 is quite much shorter than defined ? "$_" : '' ), but it feels a bit weird.
Tags (comma-separated)
Save Edits
Cancel