Gossamer Forum
Quote Reply
0777
Anyone ever tried printing 0777 in perl?

print 0777;

Damn octal digits....!

Last edited by:

RedRum: Jan 17, 2002, 4:11 AM
Quote Reply
Re: [RedRum] 0777 In reply to
Use the # modifer to force octal numbers to be printed with a leading zero.

Assuming that's what you're after?

- wil

Last edited by:

japh: Jan 17, 2002, 4:29 AM
Quote Reply
Re: [japh] 0777 In reply to
I'm not after anything...was just pointing out that it sucks.

All you need to do is:

print '0777';

...but it's just annoying seeing as octal digits are only 3 characters at max anyway so perl should be able to figure it out.

(btw it was nothing to do with leading zero's....try it out).

Last edited by:

RedRum: Jan 17, 2002, 4:34 AM
Quote Reply
Re: [RedRum] 0777 In reply to
Would do. But I have no access to a perl anywhere at the moment.

- wil
Quote Reply
Re: [japh] 0777 In reply to
print 0777;

prints 511