Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^11: Querying program port

by poj (Abbot)
on Aug 12, 2019 at 12:29 UTC ( [id://11104327]=note: print w/replies, xml ) Need Help??


in reply to Re^10: Querying program port
in thread Querying program port

bash: /home/cougarxr7/Perl/portscript333.pl: /usr/bin/perl^M: bad interpreter: No such file or directory.

That looks like you created the file with windows line ending. Try

> sudo apt-get install dos2unix
> dos2unix portscript333.pl
poj

Replies are listed 'Best First'.
Re^12: Querying program port
by CougarXR7 (Acolyte) on Aug 12, 2019 at 14:05 UTC
    Thanks for helping!
    I did not create this file, jcb created that file. I tried to download it but it took me to another page and did nothing.
    First time I copied and pasted using my win10 comp, pasted into padre. No luck.
    Second time using my Ubuntu comp, I copied and pasted into bluefish, again same results.
    Tried your suggestion, the following is from my Ubuntu terminal.
    ~$ dos2unix /home/cougarxr7/Perl/blueports.pl
    dos2unix: converting file /home/cougarxr7/Perl/blueports.pl to Unix format...
    ~$ /home/cougarxr7/Perl/blueports.pl
    bash: /home/cougarxr7/Perl/blueports.pl: Permission denied
    The file is named blueports to let me know I used Bluefish.
    Not sure what you mean with, "windows line ending"?

      "Not sure what you mean with, "windows line ending"?"

      See Newline. when you've used dos2unix you need to set the permissions on the new file, adding execute as required. chmod +x blueports.pl. You'd also benefit from an introduction to the command prompt.

        That file now runs! After applying "chmod +x blueports.pl"!
        Thank you guys, and yes I will use searches when someone post something I never heard of!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11104327]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-24 09:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found