ambrus has asked for the wisdom of the Perl Monks concerning the following question:
I fount that the statement $#="%c"; has strange side effects on operations other than stringifying floating-points. For example
Prints only a \0\n, while it should print 107\n.perl -we '$#="%c"; print ord ("k"), $/;'
works correctly. Could someone tell me why is this, is this really a bug?perl -we 'print ord ("k"), $/;'
This affects all versions of perl on my i686-linux system, that is 5.8.1, 5.8.0, 5.6.1, 5.00503.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: $#="%c"; possible bug
by Abigail-II (Bishop) on Feb 20, 2004 at 23:31 UTC | |
by ambrus (Abbot) on Feb 20, 2004 at 23:53 UTC | |
by Abigail-II (Bishop) on Feb 21, 2004 at 00:17 UTC | |
by ambrus (Abbot) on Feb 21, 2004 at 00:26 UTC | |
Re: $#="%c"; possible bug
by BrowserUk (Patriarch) on Feb 20, 2004 at 23:27 UTC | |
by ambrus (Abbot) on Feb 20, 2004 at 23:39 UTC | |
Re: $#="%c"; possible bug
by ambrus (Abbot) on Feb 21, 2004 at 18:20 UTC | |
by ambrus (Abbot) on Jul 20, 2004 at 00:24 UTC | |
Re: $#="%c"; possible bug
by ambrus (Abbot) on Feb 25, 2004 at 16:52 UTC |
Back to
Seekers of Perl Wisdom