Perl's umask equivalent command

E

E Arredondo

Hi,

I need all files created to be -rw-rw-rw , on unix I would put at the top of
the script:

#!/bin/ksh
umask 0


Can I use umask on perl ?

#!/usr/bin/perl -w
umask 0

Thanks
 
A

Anno Siegel

E Arredondo said:
Hi,

I need all files created to be -rw-rw-rw , on unix I would put at the top of
the script:

#!/bin/ksh
umask 0


Can I use umask on perl ?

#!/usr/bin/perl -w
umask 0

What happened when you ran this? See "perldoc -f umask".

Anno
 
P

Paul Lalli

E said:
I need all files created to be -rw-rw-rw , on unix I would put at the top of
the script:

#!/bin/ksh
umask 0

Can I use umask on perl ?

#!/usr/bin/perl -w
umask 0

Have you read the documentation for the function you want to use?

perldoc -f umask

Paul Lalli
 
T

Tad McClellan

Can I use umask on perl ?


Yes, perl has a function for using a umask.

I'll leave it as an exercise for the reader to guess
what such a function might be named...
 
P

Paul Lalli

E said:
That is fantabulous. I've just started programming with Perl (5 days ago)

You would do well, then, to read some built-in documentation. Of
possible interest to you would be:
perldoc perlfunc
for an alphabetical, and by-category, list of all Perl built-in
functions
perldoc perltoc
for a listing of all the available documentation
perldoc perlintro
for an introduction to get you started.

This is not intended to be mean, cruel, harsh, sarcastic, or in any
other way not-nice. It is a genuine effort to show you what help is
available for new Perl programmers.

Paul Lalli
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top