Blog
Developers
Careers
Support
Contact
Gossamer Threads
Solutions
Results
About
Mailing Lists
Resource Centre
Forum
Tools
Home
Who's Online
Tags
Favourites
Login
Forum Search
(
Advanced Search
)
This forum
This category
All forums
for
Home
:
General
:
Perl Programming
:
0777
Previous Thread
Next Thread
Print Thread
View Threaded
Jan 17, 2002, 4:09 AM
Paul
Veteran
(19537 posts)
Jan 17, 2002, 4:09 AM
Post #1 of 5
Views: 3118
Shortcut
0777
Anyone ever tried printing 0777 in perl?
print 0777;
Damn octal digits....!
Last
edited
by:
RedRum
: Jan 17, 2002, 4:11 AM
Jan 17, 2002, 4:27 AM
Wil
Veteran
/ Moderator
(4108 posts)
Jan 17, 2002, 4:27 AM
Post #2 of 5
Views: 3019
Shortcut
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
Jan 17, 2002, 4:34 AM
Paul
Veteran
(19537 posts)
Jan 17, 2002, 4:34 AM
Post #3 of 5
Views: 3021
Shortcut
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
Jan 17, 2002, 4:36 AM
Wil
Veteran
/ Moderator
(4108 posts)
Jan 17, 2002, 4:36 AM
Post #4 of 5
Views: 2998
Shortcut
Re: [RedRum] 0777
In reply to
Would do. But I have no access to a perl anywhere at the moment.
- wil
Jan 17, 2002, 4:49 AM
Paul
Veteran
(19537 posts)
Jan 17, 2002, 4:49 AM
Post #5 of 5
Views: 2989
Shortcut
Re: [japh] 0777
In reply to
print 0777;
prints 511
Previous Thread
Next Thread
Print Thread
View Threaded