wwe has asked for the wisdom of the Perl Monks concerning the following question:
this prints on my machine:use strict; use warnings; use diagnostics; use v5.10; use locale; use POSIX qw(locale_h); setlocale (LC_ALL, "german") or die "failed to load locale!"; my $number = 1/2; say 'output of say'; say $number; say 1/2; say 1/2 . " concatenate"; say 1/2 , " list"; say "1/2 concatenate"; say "1/2 list"; say $number . " concatenate"; say $number , " list"; say 'output of print'; print "$number\n"; print 1/2 . "\n"; print 1/2 . " concatenate\n"; print 1/2 , " list\n"; print "1/2 concatenate\n"; print "1/2 list\n"; print $number . " concatenate\n"; print $number , " list\n";
output of say 0,5 0,5 0.5 concatenate 0,5 list 1/2 concatenate 1/2 list 0,5 concatenate 0,5 list output of print 0,5 0.5 0.5 concatenate 0,5 list 1/2 concatenate 1/2 list
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: please explain print/say behavior with setlocale
by almut (Canon) on Mar 30, 2010 at 11:19 UTC | |
by wwe (Friar) on Mar 30, 2010 at 11:40 UTC | |
by wwe (Friar) on Mar 30, 2010 at 11:54 UTC | |
by almut (Canon) on Mar 30, 2010 at 11:59 UTC | |
by wwe (Friar) on Mar 30, 2010 at 12:11 UTC | |
|
Re: please explain print/say behavior with setlocale
by rovf (Priest) on Mar 30, 2010 at 11:03 UTC | |
by wwe (Friar) on Mar 30, 2010 at 11:47 UTC |