[31882] in Perl-Users-Digest
Perl-Users Digest, Issue: 3145 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Sep 26 11:14:24 2010
Date: Sun, 26 Sep 2010 08:14:16 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 26 Sep 2010 Volume: 11 Number: 3145
Today's topics:
Re: why does this happen? <stonerfish@geocities.com>
Re: why does this happen? <hjp-usenet2@hjp.at>
Re: why does this happen? <hadronquark@gmail.com>
Re: why does this happen? <whynot@pozharski.name>
Re: why does this happen? <mvdwege@mail.com>
Re: why does this happen? <hadronquark@gmail.com>
Re: why does this happen? <jurgenex@hotmail.com>
Re: why does this happen? <hadronquark@gmail.com>
Re: why does this happen? <jurgenex@hotmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 26 Sep 2010 05:17:54 +0000 (UTC)
From: jellybean stonerfish <stonerfish@geocities.com>
Subject: Re: why does this happen?
Message-Id: <i7ml22$ukt$1@speranza.aioe.org>
On Sat, 25 Sep 2010 17:30:19 -0600, Uno wrote:
> Hello newsgroups,
>
>
> How do I not have permission here, when all I did is increment from
> perl1 to perl2. Does a file get stripped of its priveleges
> automatically.
>
> $ ./perl1.pl
> Placido P. Octopus
<SNIP>
>
> $ ./perl2.pl
> bash: ./perl2.pl: Permission denied
> $
I don't know how you made perl2.pl
Try "ls -l perl1.pl perl2.pl"
Do they both have the same permissions?
------------------------------
Date: Sun, 26 Sep 2010 09:46:40 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: why does this happen?
Message-Id: <slrni9tuj5.a93.hjp-usenet2@hrunkner.hjp.at>
On 2010-09-26 03:33, Uno <merrilljensen@q.com> wrote:
> Jürgen Exner wrote:
>> You may want to ask in NG that deals with whatever OS you are using (you
>> didn't even say!).
>
> I x-posted to ubuntu.
>>
>> Aside of that Jens was right: that error message is not a Perl error
>> message, it is clearly issued by your shell.
>
> Nuts, jue, I have every belief that it wasn't perl. Maybe you can help
> me with this while the other subthread considers the part that is
> germane to perl.
>
> So I rename rm1.f90 to rm2.f90, and I have no problem on the command
> line except to iterate the integer that postpends the source file.
How did you rename the file? The mv command doesn't change the
permissions.
> Why is perl different?
One difference is that a fortran source file is not directly
executable. You cannot start it with "./rm1.f90". You have to use a
fortran compiler to produce an execuable, and the compiler (or rather
the linker) will set the correct permissions on the executable. A Perl
script on the other hand can be executed, but since you create it
(usually) with a text editor, you have to set the permissions yourself
(since the editor doesn't know or care whether you're writing a perl
script or a letter to your mother in law).
hp
------------------------------
Date: Sun, 26 Sep 2010 10:43:56 +0200
From: Hadron<hadronquark@gmail.com>
Subject: Re: why does this happen?
Message-Id: <i7n14f$66g$1@news.eternal-september.org>
"Peter J. Holzer" <hjp-usenet2@hjp.at> writes:
> On 2010-09-26 03:33, Uno <merrilljensen@q.com> wrote:
>> Jürgen Exner wrote:
>>> You may want to ask in NG that deals with whatever OS you are using (you
>>> didn't even say!).
>>
>> I x-posted to ubuntu.
>>>
>>> Aside of that Jens was right: that error message is not a Perl error
>>> message, it is clearly issued by your shell.
>>
>> Nuts, jue, I have every belief that it wasn't perl. Maybe you can help
>> me with this while the other subthread considers the part that is
>> germane to perl.
>>
>> So I rename rm1.f90 to rm2.f90, and I have no problem on the command
>> line except to iterate the integer that postpends the source file.
>
> How did you rename the file? The mv command doesn't change the
> permissions.
>
>> Why is perl different?
>
> One difference is that a fortran source file is not directly
> executable. You cannot start it with "./rm1.f90". You have to use a
> fortran compiler to produce an execuable, and the compiler (or rather
> the linker) will set the correct permissions on the executable. A Perl
> script on the other hand can be executed, but since you create it
> (usually) with a text editor, you have to set the permissions yourself
> (since the editor doesn't know or care whether you're writing a perl
> script or a letter to your mother in law).
>
> hp
(Thats not strictly true. Some editors do indeed know that and can be set
to chmod correctly on save - not a good idea but its possible)
As a side note regarding perl if he's a complete beginner which seems
likely it might be worth suggesting he doesnt put his scripts on the
path and he doesn't set them for exec : rather while testing he
specifically runs perl.
e.g
perl ./myscript
------------------------------
Date: Sun, 26 Sep 2010 11:25:43 +0300
From: Eric Pozharski <whynot@pozharski.name>
Subject: Re: why does this happen?
Message-Id: <slrni9u0s6.9c.whynot@orphan.zombinet>
with <8g7lp3FpvtU1@mid.individual.net> Uno wrote:
> Jens Thoms Toerring wrote:
*SKIP*
>>
>> chmod 755 perl2.pl
>>
>> or
>>
>> chmod +x perl2.pl
>>
>> and things will start to work again.
> Na, Jens, why the heck does my OS change permissions when I rename a file?
Because you're using wrong tools. Your file manager sucks, use shell
instead (whatever, I prefer zsh).
*CUT*
--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom
------------------------------
Date: Sun, 26 Sep 2010 12:14:46 +0200
From: Mart van de Wege <mvdwege@mail.com>
Subject: Re: why does this happen?
Message-Id: <861v8greuh.fsf@gareth.avalon.lan>
Hadron<hadronquark@gmail.com> writes:
>
> As a side note regarding perl if he's a complete beginner which seems
> likely it might be worth suggesting he doesnt put his scripts on the
> path and he doesn't set them for exec
As usual, you are talking bollocks.
He's using syntax that indicates he is *NOT* executing his scripts from
his $PATH. And as long as you do not explicitly do what every Linux
distribution has prevented you from doing, setting a script in your
current directory to executable is no problem at all.
Mart
--
"We will need a longer wall when the revolution comes."
--- AJS, quoting an uncertain source.
------------------------------
Date: Sun, 26 Sep 2010 12:21:44 +0200
From: Hadron<hadronquark@gmail.com>
Subject: Re: why does this happen?
Message-Id: <i7n6rq$q93$1@news.eternal-september.org>
Mart van de Wege <mvdwege@mail.com> writes:
> Hadron<hadronquark@gmail.com> writes:
>
>>
>> As a side note regarding perl if he's a complete beginner which seems
>> likely it might be worth suggesting he doesnt put his scripts on the
>> path and he doesn't set them for exec
>
> As usual, you are talking bollocks.
>
> He's using syntax that indicates he is *NOT* executing his scripts from
> his $PATH. And as long as you do not explicitly do what every Linux
> distribution has prevented you from doing, setting a script in your
> current directory to executable is no problem at all.
I suggested that its not on the path IN CASE : hence I mentioned
SPECIFICALLY running perl. At no point did I say they are currently on
the path either.
My POINT was that you DONT NEED exec permissions when developing when
you specifically invoke perl.
The choice is his.
That is VERY common during development : I dont expect you to understand.
You're a moron.
------------------------------
Date: Sun, 26 Sep 2010 07:10:30 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: why does this happen?
Message-Id: <acku969998510t0q68b11kvgg9ag1tqnjd@4ax.com>
Uno <merrilljensen@q.com> wrote:
>Jürgen Exner wrote:
>
>> You may want to ask in NG that deals with whatever OS you are using (you
>> didn't even say!).
>
>I x-posted to ubuntu.
>>
>> Aside of that Jens was right: that error message is not a Perl error
>> message, it is clearly issued by your shell.
>
>Nuts, jue, I have every belief that it wasn't perl. Maybe you can help
>me with this while the other subthread considers the part that is
>germane to perl.
???
No idea what you are trying to say in that paragraph.
>So I rename rm1.f90 to rm2.f90, and I have no problem on the command
>line except to iterate the integer that postpends the source file.
What do you mean by "iterate the integer that postpends the source
file"? And what's a f90 file?
>Why is perl different?
perl doesn't even come into the game yet. This error message "bash:
./perl2.pl: Permission denied" is thrown by bash _BEFORE_ bash even
attempts to call the perl interpreter.
It's a feature of your shell: you cannot execute a program unless you
have execute permissions for that program. And this is the same for any
executable file, no matter what programming language it is written in.
jue
------------------------------
Date: Sun, 26 Sep 2010 16:36:11 +0200
From: Hadron<hadronquark@gmail.com>
Subject: Re: why does this happen?
Message-Id: <i7nlou$h43$2@news.eternal-september.org>
Jürgen Exner <jurgenex@hotmail.com> writes:
> Uno <merrilljensen@q.com> wrote:
>>Jürgen Exner wrote:
>>
>>> You may want to ask in NG that deals with whatever OS you are using (you
>>> didn't even say!).
>>
>>I x-posted to ubuntu.
>>>
>>> Aside of that Jens was right: that error message is not a Perl error
>>> message, it is clearly issued by your shell.
>>
>>Nuts, jue, I have every belief that it wasn't perl. Maybe you can help
>>me with this while the other subthread considers the part that is
>>germane to perl.
>
> ???
> No idea what you are trying to say in that paragraph.
>
>>So I rename rm1.f90 to rm2.f90, and I have no problem on the command
>>line except to iterate the integer that postpends the source file.
>
> What do you mean by "iterate the integer that postpends the source
> file"? And what's a f90 file?
Maybe you could read between the lines and take into account English is
not the main language for everyone? by looking at his example it doesnt
take a huge leap of faith to consider he meant "increment the integer"
and we see by "postpends" he means the integer at the end of the main
file name.
rm1.f90 -> rm2.f90
1+1 = 2 ....
Not 100% certain - but as I said, not a huge leap of faith to avoid
appearing another jobs worth know all who cant be arsed with nOObs ...
>
>>Why is perl different?
>
> perl doesn't even come into the game yet. This error message "bash:
> ./perl2.pl: Permission denied" is thrown by bash _BEFORE_ bash even
> attempts to call the perl interpreter.
> It's a feature of your shell: you cannot execute a program unless you
> have execute permissions for that program. And this is the same for any
> executable file, no matter what programming language it is written in.
The same for any *file*.
Except its not. He can "execute" the file by passing it to perl. And
this would be the recommended way for a noob playing with such.
"perl ./myfile"
"sh ./mybashscript"
etc.
Easy.
------------------------------
Date: Sun, 26 Sep 2010 07:51:39 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: why does this happen?
Message-Id: <ccnu96hgmj5mvvbe39u42u0c5v5ph3s6mu@4ax.com>
Hadron<hadronquark@gmail.com> wrote:
>Jürgen Exner <jurgenex@hotmail.com> writes:
>
>> Uno <merrilljensen@q.com> wrote:
>>>Why is perl different?
>>
>> perl doesn't even come into the game yet. This error message "bash:
>> ./perl2.pl: Permission denied" is thrown by bash _BEFORE_ bash even
>> attempts to call the perl interpreter.
>> It's a feature of your shell: you cannot execute a program unless you
>> have execute permissions for that program. And this is the same for any
>> executable file, no matter what programming language it is written in.
>
>The same for any *file*.
>
>Except its not. He can "execute" the file by passing it to perl. And
>this would be the recommended way for a noob playing with such.
>
>"perl ./myfile"
>
>"sh ./mybashscript"
>
>etc.
>
So, if I understand you correctly then you are confirming, too, that
Perl is no different than any other programming language, right?
jue
------------------------------
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 3145
***************************************