On Mon Jul 06 2009 @ 7:00, Harry Putnam wrote: > Can anyone tell me how printing of $mode = 0755 turns into 493?
Yup: what's in $mode is an octal number. Its decimal equivalent is 493. What you really want to print out is the string '0755', but the string and the octal number are not the same thing. The good news is that your problem is a lot less bad than the more common one: chmod (755, foobar). (755 is 1363 in octal, an odd choice for permissions.) Try using printf and %o, which should give you 755 for $mode. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/