[31550] in Perl-Users-Digest
Perl-Users Digest, Issue: 2809 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Feb 8 21:09:31 2010
Date: Mon, 8 Feb 2010 18:09:17 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 8 Feb 2010 Volume: 11 Number: 2809
Today's topics:
Re: can I get a new httpd.conf file <tadmc@seesig.invalid>
Re: can I get a new httpd.conf file <john@castleamber.com>
Re: can I get a new httpd.conf file <john@castleamber.com>
Re: can I get a new httpd.conf file <sreservoir@gmail.com>
Re: Math not working <ben@morrow.me.uk>
Perl and "->" <steve@staticg.com>
Re: Perl and "->" <ben@morrow.me.uk>
Re: Perl and "->" <jimsgibson@gmail.com>
Re: Perl and "->" <sreservoir@gmail.com>
Re: shebang and ubuntu <Phred@example.invalid>
Re: shebang and ubuntu <Phred@example.invalid>
Re: shebang and ubuntu <sreservoir@gmail.com>
Re: shebang and ubuntu tony_curtis32@yahoo.com
Re: shebang and ubuntu <sreservoir@gmail.com>
Re: shebang and ubuntu <sreservoir@gmail.com>
Re: shebang and ubuntu <sreservoir@gmail.com>
Re: shebang and ubuntu <lws4art@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 08 Feb 2010 15:51:19 -0600
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: can I get a new httpd.conf file
Message-Id: <slrnhn11k0.978.tadmc@tadbox.sbcglobal.net>
Myron <delcofiftyfive@gmail.com> wrote:
> On Feb 8, 11:48Â am, Tad McClellan <ta...@seesig.invalid> wrote:
>> Myron <delcofiftyf...@gmail.com> wrote:
>> > I have changed mine so many times that I no longer know what I
>> > changed.
>> > How do I get a new, clean one for OpenBSD 4.6 apache.?
>>
>> How does your question relate to the Perl programming language?
>>
>> --
>> Tad McClellan
>> email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
It is bad manners to quote .sigs.
> Apache is working, Perl is working, but CGI dosen't.
Your question does NOT relate to the Perl programming language.
The steps for configuring Apache/CGI would be the same if you were
using any other programming language.
http://tinyurl.com/yjokxjm
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
------------------------------
Date: Mon, 08 Feb 2010 18:14:22 -0600
From: John Bokma <john@castleamber.com>
Subject: Re: can I get a new httpd.conf file
Message-Id: <87iqa7tgdd.fsf@castleamber.com>
Tad McClellan <tadmc@seesig.invalid> writes:
> http://tinyurl.com/yjokxjm
Please don't use obfuscated URLs like this, IMO it's as childish as
rickrollin' and I would call it bad manners. Thanks.
--
John Bokma j3b
Hacking & Hiking in Mexico - http://johnbokma.com/
http://castleamber.com/ - Perl & Python Development
------------------------------
Date: Mon, 08 Feb 2010 18:16:23 -0600
From: John Bokma <john@castleamber.com>
Subject: Re: can I get a new httpd.conf file
Message-Id: <87eikvtga0.fsf@castleamber.com>
Myron <delcofiftyfive@gmail.com> writes:
> I have changed mine so many times that I no longer know what I
> changed.
> How do I get a new, clean one for OpenBSD 4.6 apache.?
Kind request to the regulars here: If you see a question that has
nothing to do with Perl, or in any other way breaks the posting
guidelines:
Take a deep breath, and move on to the next message.
Somehow those posts attract 5+ regulars all stating nearly the same
message, and causing IMO noise that could've been prevented.
Thanks,
--
John Bokma j3b
Hacking & Hiking in Mexico - http://johnbokma.com/
http://castleamber.com/ - Perl & Python Development
------------------------------
Date: Mon, 08 Feb 2010 19:39:47 -0500
From: sreservoir <sreservoir@gmail.com>
Subject: Re: can I get a new httpd.conf file
Message-Id: <hkqast$70r$2@speranza.aioe.org>
On 2/8/2010 7:16 PM, John Bokma wrote:
> Myron<delcofiftyfive@gmail.com> writes:
>
>> I have changed mine so many times that I no longer know what I
>> changed.
>> How do I get a new, clean one for OpenBSD 4.6 apache.?
>
> Kind request to the regulars here: If you see a question that has
> nothing to do with Perl, or in any other way breaks the posting
> guidelines:
>
> Take a deep breath, and move on to the next message.
>
> Somehow those posts attract 5+ regulars all stating nearly the same
> message, and causing IMO noise that could've been prevented.
and, of course, you're just generating more noise.
just filter the title out an move on.
--
"Six by nine. Forty two."
"That's it. That's all there is."
"I always thought something was fundamentally wrong with the universe"
------------------------------
Date: Mon, 8 Feb 2010 23:26:11 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Math not working
Message-Id: <j5j647-jnh1.ln1@osiris.mauzo.dyndns.org>
Quoth Ilya Zakharevich <nospam-abuse@ilyaz.org>:
> On 2010-02-06, Ben Morrow <ben@morrow.me.uk> wrote:
> > [1] I consider the fact that fallback => 1 isn't the default to be a bug
> > in the perl overloading system, but it's much too late to change
> > that now. Apart from anything else, any new overloads (like the -X
> > overload that will be in 5.12) must behave as though fallback=>1
> > were specified, for compatibility.
[I had forgotten you were the one to originally implement overloading.
Just to be clear, the above was in no way intended as any sort of veiled
personal attack.]
> If you think so, just make overload::simple which has a different
> default for `fallback'.
That doesn't help in this case, where someone has written a class that
doesn't use fallback when IMHO it should. It's very unusual in Perl to
have a value that will stringify but won't numify, so one shouldn't be
created without a very good reason.
> In my first experiments, I saw that the behaviour with {fallback =>
> 1} was too error-prone - it was very hard for the developer to see
> whether the codepath was through convert-to-Perlish-data methods, or
> through the "specialized operations" methods.
>
> So I made the default 0.
I can see that might be a problem, though I think it's one the developer
has to deal with anyway. Would you agree with me that new overload types
*must* default to falling back, and that this is then unnecessarily
confusing, with some overloads honouring 'fallback' and some not?
Ben
------------------------------
Date: Mon, 8 Feb 2010 15:13:15 -0800 (PST)
From: Steve <steve@staticg.com>
Subject: Perl and "->"
Message-Id: <70d21c5d-dfe4-42de-b296-cc1cb2603ccd@a5g2000prg.googlegroups.com>
Can anyone please explain to me exactly how this "->" works and what
it's for? I've relatively new to perl, and I have a decent
understanding of it, but not sure what that means. I'm guessing it's
used to pass values to modules... or something?
Take this sub routine for example:
sub OnInit {
my( $this ) = @_;
my $frame = Wx::Frame->new( undef, -1, 'wxPerl',
wxDefaultPosition, [ 200, 100 ] );
$frame->{TXT} = Wx::TextCtrl->new( $frame , -1, '');
$frame->Show( 1 );
download( $frame, "http://cpan.org/modules/
01modules.index.html" );
}
------------------------------
Date: Tue, 9 Feb 2010 00:06:58 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Perl and "->"
Message-Id: <2il647-70i1.ln1@osiris.mauzo.dyndns.org>
Quoth Steve <steve@staticg.com>:
> Can anyone please explain to me exactly how this "->" works and what
> it's for? I've relatively new to perl, and I have a decent
> understanding of it, but not sure what that means. I'm guessing it's
> used to pass values to modules... or something?
'->' is one of the dereference operators (see perlreftut and perlref).
One of its uses is to call methods (see perlboot). This form is often
spelled '.' in other languages (Java and JS, for instance).
> Take this sub routine for example:
>
> sub OnInit {
> my( $this ) = @_;
>
> my $frame = Wx::Frame->new( undef, -1, 'wxPerl',
> wxDefaultPosition, [ 200, 100 ] );
This is a call to the 'new' method of the Wx::Frame class. You would
need to look at the documentation for Wx::Frame to see what that does.
> $frame->{TXT}
This assumes $frame contains a ref to a hash, and returns the "TXT"
member of that hash.
> $frame->Show( 1 );
This assumes $frame contains an object, and calls the 'Show' method of
that object. You would need to look at the documentation for whatever
class $frame belongs to (Wx::Frame in this case) to see what that does.
Ben
------------------------------
Date: Mon, 08 Feb 2010 16:23:46 -0800
From: Jim Gibson <jimsgibson@gmail.com>
Subject: Re: Perl and "->"
Message-Id: <080220101623466423%jimsgibson@gmail.com>
In article
<70d21c5d-dfe4-42de-b296-cc1cb2603ccd@a5g2000prg.googlegroups.com>,
Steve <steve@staticg.com> wrote:
> Can anyone please explain to me exactly how this "->" works and what
> it's for? I've relatively new to perl, and I have a decent
> understanding of it, but not sure what that means. I'm guessing it's
> used to pass values to modules... or something?
>
> Take this sub routine for example:
>
> sub OnInit {
> my( $this ) = @_;
>
> my $frame = Wx::Frame->new( undef, -1, 'wxPerl',
> wxDefaultPosition, [ 200, 100 ] );
> $frame->{TXT} = Wx::TextCtrl->new( $frame , -1, '');
> $frame->Show( 1 );
> download( $frame, "http://cpan.org/modules/
> 01modules.index.html" );
> }
The '->' is a way of dereferencing a reference. It can be used in
several ways (that I can think of):
1. Deferencing a reference to a hash or array:
$hashref->{key} is equivalent to ${$hashref}{key}
2. Dereferencing a call to a subroutine:
my $subref = sub { print "$1\n"; };
$subref->('Print this');
3. Calling object methods (objects are blessed references):
$frame->Show(1);
4. Callign package functions:
my $frame = Wx::Frame->new( undef, ... );
which is (almost) equivalent to:
my $frame = Wx::Frame::new( Wx::Frame, undef, ... );
i.e., the package is the first argument passed to the new() function.
Your example has 3 of these 4 uses.
--
Jim Gibson
------------------------------
Date: Mon, 08 Feb 2010 19:37:40 -0500
From: sreservoir <sreservoir@gmail.com>
Subject: Re: Perl and "->"
Message-Id: <hkqaou$70r$1@speranza.aioe.org>
On 2/8/2010 7:23 PM, Jim Gibson wrote:
> which is (almost) equivalent to:
>
> my $frame = Wx::Frame::new( Wx::Frame, undef, ... );
er, prefer Wx::Frame::new(Wx::Frame::, ...) if you must. Wx::Frame
might refer to function Frame in package Wx. The trailing :: also
implicitly quotes, iirc.
--
"Six by nine. Forty two."
"That's it. That's all there is."
"I always thought something was fundamentally wrong with the universe"
------------------------------
Date: Mon, 08 Feb 2010 17:10:11 -0700
From: Phred Phungus <Phred@example.invalid>
Subject: Re: shebang and ubuntu
Message-Id: <7tbnf4F7rhU1@mid.individual.net>
ccc31807 wrote:
> On Feb 8, 3:55 am, Phred Phungus <Ph...@example.invalid> wrote:
>> I have a common problem that files tell my that I'm not allowed there.
>> If I recall my reading, I was referred to chmod(). I've looked at that
>> several times, and it doesn't seem to take, at least as a man page.
>
> I find chmod very easy and intuitive, but I never use the + or -
> syntax, I always use the octal syntax, e.g., 'chomd 755 some.file'
>
> Read is 4, write is 2, and execute is 1, so that 755 meas that owner
> has read, write, and execute permissions, and that group and other has
> read and execute permissions. 644 means that owner has read and write
> permissions and group and other only has read. 700 locks out everyone
> except the owner.
>
> CC.
Thanks all for replies. I hope this sticks now. I've made a linuxlog
for this go around and I'm gonna put your comments and this there:
dan@dan-desktop:~/source42$ chmod u + x t1.pl
chmod: invalid mode: `u'
Try `chmod --help' for more information.
dan@dan-desktop:~/source42$ chmod u+x t1.pl
dan@dan-desktop:~/source42$ ls -l
total 32
-rw-r--r-- 1 dan dan 2556 2010-02-07 18:46 b1.c
-rw-r--r-- 1 dan dan 2555 2010-02-07 18:46 b1.c~
-rwxr-xr-x 1 dan dan 13344 2010-02-07 18:47 out
-rwxr--r-- 1 dan dan 138 2010-02-08 01:34 t1.pl
-rw-r--r-- 1 dan dan 31 2010-02-08 01:30 t1.pl~
One sees here the permissions as gcc creates an executable (out).
dan@dan-desktop:~/source42$ ./t1.pl
t1.pl out b1.c~ t1.pl~ .. . b1.c
dan@dan-desktop:~/source42$ chmod 755 t1.pl
dan@dan-desktop:~/source42$ ls -l t1.pl
-rwxr-xr-x 1 dan dan 138 2010-02-08 01:34 t1.pl
dan@dan-desktop:~/source42$ ./t1.pl
t1.pl out b1.c~ t1.pl~ .. . b1.c
dan@dan-desktop:~/source42$ chmod 644 t1.pl
dan@dan-desktop:~/source42$ ls -l t1.pl
-rw-r--r-- 1 dan dan 138 2010-02-08 01:34 t1.pl
dan@dan-desktop:~/source42$ ./t1.pl
bash: ./t1.pl: Permission denied
dan@dan-desktop:~/source42$ chmod 700 t1.pl
dan@dan-desktop:~/source42$ ls -l t1.pl
-rwx------ 1 dan dan 138 2010-02-08 01:34 t1.pl
dan@dan-desktop:~/source42$ ./t1.pl
t1.pl out b1.c~ t1.pl~ .. . b1.c
chmod seems to have been another instance where my C notion that
whitespace is better has led me astray. Since it's just me on this
machine, I think I'll go with chmod 700 in the future.
Cheers,
--
fred
------------------------------
Date: Mon, 08 Feb 2010 17:24:14 -0700
From: Phred Phungus <Phred@example.invalid>
Subject: Re: shebang and ubuntu
Message-Id: <7tbo9fFbg1U1@mid.individual.net>
Jürgen Exner wrote:
> Phred Phungus <Phred@example.invalid> wrote:
>> I have a common problem that files tell my that I'm not allowed there.
>> If I recall my reading, I was referred to chmod(). I've looked at that
>> several times, and it doesn't seem to take, at least as a man page.
>>
>> Does perl have a way to manipulate these file permissions?
>>
>> dan@dan-desktop:~/source42$ perl t1.pl
>
> What is "~/source42$"? Is that part of your prompt? That is confusing to
> say the least!
I've got all these refugee directories named source leftover from when I
would use gnu software on windows. Now on linux, not only do I have a
shebang line that does something, but I also have the option of creating
a terminal anywhere I want with a right-click and selection. So I've
got a lot more flexibility than trying bring up a dos terminal quickly.
Since this is x-posted to alt.os.linux.ubuntu, I would be curious where
others like to put their perl scripts.
>
>> t1.pl out b1.c~ t1.pl~ .. . b1.c
>> dan@dan-desktop:~/source42$ ./t1.pl
>> bash: ./t1.pl: Permission denied
>
> That error message is a bash error message, it has nothing to do with
> Perl.
> There can be more obscure reasons but most likely you didn't set the
> file permissions for t1.pl to executable.
>
>> dan@dan-desktop:~/source42$ cat t1.pl
>> #!/usr/bin/perl
>
> One of those more obscure reasons could be that /usr/bin/perl itself is
> not executable for you and this is being masked by a different perl
> being executed in your first command (did you try 'which perl'?).
dan@dan-desktop:~/source42$ which perl
/usr/bin/perl
I've now tripped on another instance of being denied permission:
dan@dan-desktop:/usr/bin$ ls -l >text1.txt
bash: text1.txt: Permission denied
dan@dan-desktop:/usr/bin$ ls -l text1.txt
ls: cannot access text1.txt: No such file or directory
dan@dan-desktop:/usr/bin$
How can a non-existent file deny me permission?
--
fred
------------------------------
Date: Mon, 08 Feb 2010 19:42:21 -0500
From: sreservoir <sreservoir@gmail.com>
Subject: Re: shebang and ubuntu
Message-Id: <hkqb1m$70r$3@speranza.aioe.org>
On 2/8/2010 7:10 PM, Phred Phungus wrote:
> ccc31807 wrote:
>> On Feb 8, 3:55 am, Phred Phungus <Ph...@example.invalid> wrote:
>>> I have a common problem that files tell my that I'm not allowed there.
>>> If I recall my reading, I was referred to chmod(). I've looked at that
>>> several times, and it doesn't seem to take, at least as a man page.
>>
>> I find chmod very easy and intuitive, but I never use the + or -
>> syntax, I always use the octal syntax, e.g., 'chomd 755 some.file'
>>
>> Read is 4, write is 2, and execute is 1, so that 755 meas that owner
>> has read, write, and execute permissions, and that group and other has
>> read and execute permissions. 644 means that owner has read and write
>> permissions and group and other only has read. 700 locks out everyone
>> except the owner.
>>
>> CC.
>
> Thanks all for replies. I hope this sticks now. I've made a linuxlog for
> this go around and I'm gonna put your comments and this there:
>
> dan@dan-desktop:~/source42$ chmod u + x t1.pl
> chmod: invalid mode: `u'
> Try `chmod --help' for more information.
> dan@dan-desktop:~/source42$ chmod u+x t1.pl
> dan@dan-desktop:~/source42$ ls -l
> total 32
> -rw-r--r-- 1 dan dan 2556 2010-02-07 18:46 b1.c
> -rw-r--r-- 1 dan dan 2555 2010-02-07 18:46 b1.c~
> -rwxr-xr-x 1 dan dan 13344 2010-02-07 18:47 out
> -rwxr--r-- 1 dan dan 138 2010-02-08 01:34 t1.pl
> -rw-r--r-- 1 dan dan 31 2010-02-08 01:30 t1.pl~
>
> One sees here the permissions as gcc creates an executable (out).
>[snip]
> chmod seems to have been another instance where my C notion that
> whitespace is better has led me astray. Since it's just me on this
> machine, I think I'll go with chmod 700 in the future.
well, you're giving chmod two extra arguments. do you expect it to work?
--
"Six by nine. Forty two."
"That's it. That's all there is."
"I always thought something was fundamentally wrong with the universe"
------------------------------
Date: Mon, 08 Feb 2010 18:50:01 -0600
From: tony_curtis32@yahoo.com
Subject: Re: shebang and ubuntu
Message-Id: <87tytrb5c6.fsf@yahoo.com>
Phred Phungus <Phred@example.invalid> writes:
> I've now tripped on another instance of being denied permission:
>
> dan@dan-desktop:/usr/bin$ ls -l >text1.txt
> bash: text1.txt: Permission denied
> dan@dan-desktop:/usr/bin$ ls -l text1.txt
> ls: cannot access text1.txt: No such file or directory
> dan@dan-desktop:/usr/bin$
>
>
> How can a non-existent file deny me permission?
* what is the current directory?
* which user are you?
* which user owns the current directory?
hth
t
------------------------------
Date: Mon, 08 Feb 2010 20:05:31 -0500
From: sreservoir <sreservoir@gmail.com>
Subject: Re: shebang and ubuntu
Message-Id: <hkqcd5$8ta$1@speranza.aioe.org>
On 2/8/2010 7:50 PM, tony_curtis32@yahoo.com wrote:
> Phred Phungus<Phred@example.invalid> writes:
>
>> I've now tripped on another instance of being denied permission:
>>
>> dan@dan-desktop:/usr/bin$ ls -l>text1.txt
>> bash: text1.txt: Permission denied
>> dan@dan-desktop:/usr/bin$ ls -l text1.txt
>> ls: cannot access text1.txt: No such file or directory
>> dan@dan-desktop:/usr/bin$
>>
>>
>> How can a non-existent file deny me permission?
>
> * what is the current directory?
> * which user are you?
> * which user owns the current directory?
he seems to be a non-root user in /usr/bin (usually root:root/wheel).
naturally he wouldn't be able to create a file.
--
"Six by nine. Forty two."
"That's it. That's all there is."
"I always thought something was fundamentally wrong with the universe"
------------------------------
Date: Mon, 08 Feb 2010 20:06:00 -0500
From: sreservoir <sreservoir@gmail.com>
Subject: Re: shebang and ubuntu
Message-Id: <hkqce2$8ta$2@speranza.aioe.org>
On 2/8/2010 7:24 PM, Phred Phungus wrote:
> Jürgen Exner wrote:
>> Phred Phungus <Phred@example.invalid> wrote:
>>> I have a common problem that files tell my that I'm not allowed
>>> there. If I recall my reading, I was referred to chmod(). I've looked
>>> at that several times, and it doesn't seem to take, at least as a man
>>> page.
>>>
>>> Does perl have a way to manipulate these file permissions?
>>>
>>> dan@dan-desktop:~/source42$ perl t1.pl
>>
>> What is "~/source42$"? Is that part of your prompt? That is confusing to
>> say the least!
>
> I've got all these refugee directories named source leftover from when I
> would use gnu software on windows. Now on linux, not only do I have a
> shebang line that does something, but I also have the option of creating
> a terminal anywhere I want with a right-click and selection. So I've got
> a lot more flexibility than trying bring up a dos terminal quickly.
>
> Since this is x-posted to alt.os.linux.ubuntu, I would be curious where
> others like to put their perl scripts.
>
>>
>>> t1.pl out b1.c~ t1.pl~ .. . b1.c
>>> dan@dan-desktop:~/source42$ ./t1.pl
>>> bash: ./t1.pl: Permission denied
>>
>> That error message is a bash error message, it has nothing to do with
>> Perl. There can be more obscure reasons but most likely you didn't set
>> the
>> file permissions for t1.pl to executable.
>>
>>> dan@dan-desktop:~/source42$ cat t1.pl
>>> #!/usr/bin/perl
>>
>> One of those more obscure reasons could be that /usr/bin/perl itself is
>> not executable for you and this is being masked by a different perl
>> being executed in your first command (did you try 'which perl'?).
>
> dan@dan-desktop:~/source42$ which perl
> /usr/bin/perl
>
> I've now tripped on another instance of being denied permission:
>
> dan@dan-desktop:/usr/bin$ ls -l >text1.txt
> bash: text1.txt: Permission denied
> dan@dan-desktop:/usr/bin$ ls -l text1.txt
> ls: cannot access text1.txt: No such file or directory
> dan@dan-desktop:/usr/bin$
>
>
> How can a non-existent file deny me permission?
it isn't. the directory is denying creat permission.
--
"Six by nine. Forty two."
"That's it. That's all there is."
"I always thought something was fundamentally wrong with the universe"
------------------------------
Date: Mon, 08 Feb 2010 20:07:31 -0500
From: sreservoir <sreservoir@gmail.com>
Subject: Re: shebang and ubuntu
Message-Id: <hkqcgs$8ta$3@speranza.aioe.org>
On 2/8/2010 8:06 PM, sreservoir wrote:
> On 2/8/2010 7:24 PM, Phred Phungus wrote:
>> Jürgen Exner wrote:
>>> Phred Phungus <Phred@example.invalid> wrote:
>>>> I have a common problem that files tell my that I'm not allowed
>>>> there. If I recall my reading, I was referred to chmod(). I've looked
>>>> at that several times, and it doesn't seem to take, at least as a man
>>>> page.
>>>>
>>>> Does perl have a way to manipulate these file permissions?
>>>>
>>>> dan@dan-desktop:~/source42$ perl t1.pl
>>>
>>> What is "~/source42$"? Is that part of your prompt? That is confusing to
>>> say the least!
>>
>> I've got all these refugee directories named source leftover from when I
>> would use gnu software on windows. Now on linux, not only do I have a
>> shebang line that does something, but I also have the option of creating
>> a terminal anywhere I want with a right-click and selection. So I've got
>> a lot more flexibility than trying bring up a dos terminal quickly.
>>
>> Since this is x-posted to alt.os.linux.ubuntu, I would be curious where
>> others like to put their perl scripts.
>>
>>>
>>>> t1.pl out b1.c~ t1.pl~ .. . b1.c
>>>> dan@dan-desktop:~/source42$ ./t1.pl
>>>> bash: ./t1.pl: Permission denied
>>>
>>> That error message is a bash error message, it has nothing to do with
>>> Perl. There can be more obscure reasons but most likely you didn't set
>>> the
>>> file permissions for t1.pl to executable.
>>>
>>>> dan@dan-desktop:~/source42$ cat t1.pl
>>>> #!/usr/bin/perl
>>>
>>> One of those more obscure reasons could be that /usr/bin/perl itself is
>>> not executable for you and this is being masked by a different perl
>>> being executed in your first command (did you try 'which perl'?).
>>
>> dan@dan-desktop:~/source42$ which perl
>> /usr/bin/perl
>>
>> I've now tripped on another instance of being denied permission:
>>
>> dan@dan-desktop:/usr/bin$ ls -l >text1.txt
>> bash: text1.txt: Permission denied
>> dan@dan-desktop:/usr/bin$ ls -l text1.txt
>> ls: cannot access text1.txt: No such file or directory
>> dan@dan-desktop:/usr/bin$
>>
>>
>> How can a non-existent file deny me permission?
>
> it isn't. the directory is denying creat permission.
are you, by any chance, a former user of one of those OSes that log
one on as root by default?
--
"Six by nine. Forty two."
"That's it. That's all there is."
"I always thought something was fundamentally wrong with the universe"
------------------------------
Date: Mon, 08 Feb 2010 20:20:52 -0500
From: "Jonathan N. Little" <lws4art@gmail.com>
Subject: Re: shebang and ubuntu
Message-Id: <hkqd8u$k14$1@news.eternal-september.org>
Phred Phungus wrote:
> I've now tripped on another instance of being denied permission:
>
> dan@dan-desktop:/usr/bin$ ls -l >text1.txt
> bash: text1.txt: Permission denied
If you are not root you cannot write to the /usr/bin folder
Try
sudo sh -c "ls -l > text1.txt"
Or redirect do a folder that you *do* have write permission
ls -l > ~/text1.txt
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 2809
***************************************