LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 08-20-2007, 03:01 AM   #16
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,437

Original Poster
Rep: Reputation: Disabled

Well, I have none other than those you posted (I am no regular perl user), so I don't really know.
 
Old 08-20-2007, 11:49 PM   #17
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 30
Three things.

Thing one:

The symptoms you're describing are really weird, and it looks as though Perl might be misinstalled somehow.

Please, as the next step, do this at the shell prompt, and post the complete output verbatim:

Code:
which perl
perl -v
Thing two, in answer to your previous question:

Quote:
What now? Might there be some missing perl modules (in particular the printing module)? What perl files constitute a complete installation, i.e. could you post the perl directory from your machine?
Perl and its supporting files are in various places: man pages, for example, and (yes) modules. But the Perl executable itself is just one file. You don't need any extra modules (which are just Perl code) to do anything we have discusses in this thread.

Thing three: Um, I hesitate to mention this, but if uuencode was not properly installed on your system (quite an unusual situation, I think), then is there any chance that Perl is misinstalled? I suspect it would be easier to reinstall Perl than to try to figure out which pieces are missing. (And where the pieces are can vary from one Linux distribution to another, I suspect.
 
Old 08-22-2007, 03:25 AM   #18
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,437

Original Poster
Rep: Reputation: Disabled
Uargh. I followed your directions as requested and forgot to bring the floppy along on which I stored the output. I'll do it from memory as best as I can:
Code:
which perl
/usr/sbin/perl
perl -v
perl5.8.7-linux-thread-multi {or something of this ilk}
<edit> Could that mean that the perl5.8.7 interpreter "has gone sour" or is buggy? Anything known alog these lines? </edit> <edit2> What's that line doing here? Some other text snippet got deleted as well...<edit2>
Quote:
Originally Posted by wjevans_7d1@yahoo.co View Post
Three things.

Thing one:

The symptoms you're describing are really weird, and it looks as though Perl might be misinstalled somehow.
...
Um, I hesitate to mention this, but if uuencode was not properly installed on your system (quite an unusual situation, I think), then is there any chance that Perl is misinstalled? ...
No reason to hesitate . I removed and re-installed perl, to no avail.

But here it comes: I noticed in Konqueror, that the three perl scripts (your examples, posted above!) were presented as type "simple text" "unknown" and "perl script". Thus I tried to find out what caused this behaviour.

I also noticed that whereas the preview of the perl script file in Kate showed a color scheme the others didn't.

I opened them with Kate (and to make a long story short) I changed the encoding scheme from utf8 to iso8859-15. Then I noticed a few funny characters before the leading "#!/usr/sbin/perl" which I deleted (the funny characters ).

After that I had three files of the type "perls script" ... but I got new errors which I'll post the day after tomorrow (I'll be gone for 1 1/2 days).

They are in the lines of the error I posted above, something like "print("Hello,: bad interpreter: file or directory not found" for all the scripts.

<edit> Could that mean that the perl-5.8.7 interpreter "has gone sour" on me or is it known to be buggy? </edit>

Last edited by JZL240I-U; 08-24-2007 at 03:22 AM. Reason: Questions at the end added.
 
Old 08-23-2007, 12:25 AM   #19
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 30
I don't think that the Perl interpreter has gone sour on you. I suspect it's garbage characters at the beginning of the scripts. (Unlike my wife, I don't use any software whose name begins with the letter k.)

Let's see more details when you get back.
 
Old 08-24-2007, 07:00 AM   #20
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,437

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by wjevans_7d1@yahoo.co View Post
... I suspect it's garbage characters at the beginning of the scripts.
But, as you'll have noted, I deleted those and the scripts are recognized as perl scripts. What more can I do to make sure nothing is left, any suggestions?
Quote:
Originally Posted by wjevans_7d1@yahoo.co View Post
...(Unlike my wife, I don't use any software whose name begins with the letter k.)
Ah, but I got the first hints of a (possible) solution from that k-software. Honestly, KDE is that much better than Win...

As to the details, here is the promised output from the two commands and the three scripts:
Code:
linux:~ #
linux:~ # which perl
/usr/bin/perl
linux:~ # perl -v

This is perl, v5.8.7 built for i586-linux-thread-multi



linux:~ # /home/me/perl-test
print("Hello,: bad interpreter: No such file or directory
linux:~ # /home/me/perl-pw-gen
: bad interpreter: No such file or directoryerl {<== even here the text is broken}
linux:~ # /home/me/perl-pwd
$a=`dd: bad interpreter: No such file or directory
linux:~ #
Note that in all three cases the error messages is mangled, in the second attempt even at the end of the message...

Last edited by JZL240I-U; 08-24-2007 at 07:04 AM.
 
Old 08-24-2007, 11:46 PM   #21
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 30
Ok, the next step is to do this, and post the output. In "x1", the second character is a numeral one, not the letter ell.
Code:
file /home/me/perl-test
file /home/me/perl-pw-gen
file /home/me/perl-pwd
od -t x1 -N 32 /home/me/perl-test
od -t x1 -N 32 /home/me/perl-pw-gen
od -t x1 -N 32 /home/me/perl-pwd
 
Old 08-28-2007, 01:30 AM   #22
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,437

Original Poster
Rep: Reputation: Disabled
Okay, here it comes:
Code:
linux:~ # file /home/me/perl-pw-gen
/home/me/perl-pw-gen: perl script text
You have new mail in /var/spool/mail/root
linux:~ # file /home/me/perl-pwd
/home/me/perl-pwd: perl script text
linux:~ # file /home/me/perl-test
/home/me/perl-test: perl script text
linux:~ # od -t x1 -N 32 /home/me/perl-pw-gen
0000000 23 21 2f 75 73 72 2f 62 69 6e 2f 70 65 72 6c 0d
0000020 0a 0d 0a 24 61 3d 60 64 64 20 69 66 3d 2f 64 65
0000040
linux:~ # od -t x1 -N 32 /home/me/perl-pwd
0000000 23 21 2f 75 73 72 2f 62 69 6e 2f 70 65 72 6c 0d
0000020 24 61 3d 60 64 64 20 69 66 3d 2f 64 65 76 2f 75
0000040
linux:~ # od -t x1 -N 32 /home/me/perl-test
0000000 23 21 2f 75 73 72 2f 62 69 6e 2f 70 65 72 6c 0d
0000020 70 72 69 6e 74 28 22 48 65 6c 6c 6f 2c 20 77 6f
0000040
linux:~ #
From what I remember of HEX-code this seems okay?!?

<edit aug. 29> No, it's not. What the... I'll have to check that, be back on friday (I hope).

</edit2 aug. 31> Wrong again (comes from doing things from memory). I can't see anything wrong here. You?

Last edited by JZL240I-U; 08-31-2007 at 03:11 AM.
 
Old 08-31-2007, 05:55 AM   #23
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,437

Original Poster
Rep: Reputation: Disabled
I'll try this over the weekend (whatever it does ):

http://www.linuxquestions.org/questi...7&postcount=10

Last edited by JZL240I-U; 08-31-2007 at 07:06 AM.
 
Old 09-01-2007, 10:20 AM   #24
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 30
Um, look carefully at that hex stuff. Line endings appear thus:

Code:
<CR>        0d       Macintosh
<LF>        0a       *nix
<CR><LF>    0d 0a    Microsoft(spit)
The *nix environment is often forgiving of <CR><LF>, but not of just <CR>. /home/me/perl-pw-gen has <CR><LF> at the end of the first line which is ok. But each of the other two files has <CR> only. This is a Bad Thing(tm).

Hope this helps.
 
Old 09-03-2007, 01:30 AM   #25
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,437

Original Poster
Rep: Reputation: Disabled
Solved

You are right. Funny enough, the script does not run, so perl is not enough "forgiving" .

When I used either of the commands
Code:
perl -i -pe's/\r$//;' <file name>
dos2unix <file name>
it does work, though. The others (perl-test and perl-pwd) still refused to run.

Thus I typed by hand (in the editor Kate) the "Hello, world!" script and lo and behold then it did work.

Solution: Do never ever use µsoft software to copy any files from the net to Linux (*nix)

Thank you for your support, help and patience, wjevans_7d1@yahoo.com
 
Old 09-04-2007, 05:16 PM   #26
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 30
Quoth JZL240I-U:
Quote:
You are right. Funny enough, the script does not run, so perl is not enough "forgiving" .
It isn't Perl's fault. When you're in the bash shell and you run something which begins with
Code:
#!
then bash interprets the rest of the line to determine what program to call. It tripped up on those two files because "the rest of the line" extends until the first 0x0A character. It isn't bash's job to figure out what the script really "meant"; it's bash's job to tell you that it couldn't find the right interpreter for the script.

Which is exactly what it did.

Quote:
Solution: Do never ever use µsoft software to copy any files from the net to Linux (*nix)
Partially true.
 
Old 09-05-2007, 01:11 AM   #27
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,437

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by wjevans_7d1@yahoo.co View Post
... It isn't bash's job to figure out what the script really "meant"; it's bash's job to tell you that it couldn't find the right interpreter for the script.

Which is exactly what it did.
Well, yes. On the other hand with pure bash scripts I had had no problems up until now, when I tried calling perl. But I don't mean to dispute your diagnosis.


Quote:
Originally Posted by wjevans_7d1@yahoo.co View Post
Partially true.
Well, there is that. But you'll understand that I was recently traumatized .
 
Old 09-06-2007, 01:00 AM   #28
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 30
As long as you now have everything under control, it's all good.

Happy trails.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Random number generation jacques83 Programming 5 02-04-2006 12:38 PM
java- static messing with random number generation titanium_geek Programming 8 10-15-2005 01:39 PM
random number generation sailu_mvn Programming 4 03-10-2005 02:10 PM
Strong password generation Lindy Linux - Software 2 12-27-2003 07:00 PM
Generation of random primes SaTaN Programming 12 10-30-2003 04:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 06:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration