Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
When I run this code, it complains that
"Useless use of reference constructor in void context."
Can someone tell me what is going on?
"Useless use of reference constructor in void context."
Can someone tell me what is going on?
On the other hand, this works.#!/usr/bin/perl use strict; use warnings; ( my $test ) ? print 'c' : sub { print 'a'; print 'b' }
#!/usr/bin/perl use strict; use warnings; ( my $test ) ? print 'c' : print_me(); sub print_me { print 'a'; print 'b'; }
Back to
Seekers of Perl Wisdom