in reply to Re: Read a variable backwards..in thread Read a variable backwards..
Make that
say chop $str while length $str; [download]
Otherwise if the string starts with 0, the last iteration will be omitted, because Perl considers the string 0 to be false.