Results 1 to 10 of 10

Thread: Perl

  1. #1

    Default Perl

    Hi. I'm brand new to Linux but I have over 30 years in computers. I have installed 11.4 on my computer. I have been searching for help getting a script to work. So far I have learned that the script has a .pl extension. I found instructions saying I need to make the script executable & that the first lines have to reference the location of perl. The file has that reference in it.

    I have found threads saying I have to install perl. How do I do that? Please keep in mind I have never done this before & telling me to get it from the software repository is not enough. I need to know how to do that as well. Then I need to know how to make the script executible.

    Please help but be as basic as possible. Remember there was a time you didn't know how to do this either.

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Perl

    You'll find that perl is already installed by default because so many things in the system require it.

    The first line should be:

    Code:
    #!/usr/bin/perl -w
    BTW, use a Linux editor to insert this line, do not use a Windows editor, or things will go pear shaped. In fact it's best if you use a Linux editor for editing the file, far less hassles later. Then you should make the file executable by:

    Code:
    chmod u+rx script.pl
    and you can run it by:

    Code:
    ./script.pl

  3. #3

    Default Re: Perl

    Hi,

    Thanks for the reply. Here is the link for the script I'm looking at.

    XP Unlimited :: IPConsult BV - Load Balancing client for Linux / Apple, based on perl

    When I click on the link on the website it opens the script file in a window in Firefox. I copied it & pasted it into kwrite. The first line you mentioned is already in the file. Do I add these other lines to the file? How do I save it? How do I run it? I would like to create a desktop icon to execute it. I warned you. Very basic. I have written login scripts for Windows Server but I've never done anything like this.

    Thanks again.

  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Perl

    On 2011-04-09 20:06, DoingThisForever wrote:
    > I warned you. Very basic.


    http://doc.opensuse.org/ --> startup

    http://en.opensuse.org/Concepts

    http://en.wikibooks.org/wiki/Linux_For_Newbies --> Using Linux

    http://en.wikipedia.org/wiki/Linux

    http://forums.opensuse.org/english/g...faq-read-only/

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

  5. #5

    Default Re: Perl

    You know as I stated I've been working with computers for a long time. I started with Basic, TRS-DOS, then LS-DOS. Now I work in the Windows world. I've learned them all inside & out. I have worked my way through hundreds, maybe thousands of problems. I can write login scripts & edit registry's with the best of them. Unlike a lot of computer people I also have a life. I don't try to learn some different OS unless I see a reason to do so. Using the program shown above is a good enough reason. If I can get it working I will learn the OS since I will have to support it.

    This is the 3rd time I have loaded Linux on a computer. The first 2 times I never got past getting the hardware setup. The biggest reason is the level of help I get when I ask a question. Do this, do that, but never any instruction on how to do it. If I was having this problem in Windows there would be dozens of people responding with complete step by step instructions on how to do what I want.

    In my first post I mentioned that the location of perl was shown in the script, yet the first respondant told me to make sure it was there. Then he went on with some other suggestions with no explination as to what to do with them. Then when I reply that I need more info I get a response that sends me to read a bunch of web sites.

    Is it too much to ask for a step by step instruction on how to convert this script to a usable program & then explain how to run it?

    This is exactly why Linux will never become a mainstream OS. If someone with my experience asks intelegent questions & has the ability to at least work with the answers can't get decent help what chance does a regular computer user have?

  6. #6
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Perl

    It looks like you are trying to run before walking. Try to learn some basic concepts first, like the command line, files, permissions, etc. There are some good suggestions in Robin's post.

  7. #7

    Default Re: Perl

    On 04/09/2011 07:06 PM, DoingThisForever wrote:
    snip

    > This is exactly why Linux will never become a mainstream OS. If
    > someone with my experience asks intelligent questions& has the ability
    > to at least work with the answers can't get decent help what chance does
    > a regular computer user have?


    He has the same chance of success as an average Windows user has of
    being a programmer or even a power user. It isn't particularly hard to
    learn the basics, but one does have to learn the basics. They're
    different for Linux than Windows. As they are for a Mac. I have to use
    Windows at work and sometimes it drives me nuts because there's so many
    great little programs and utilities in Linux that are lacking in Windows
    like grep or sed, etc. But one makes do. I can find my way around
    Linux just fine though I'm far from guru rank. On my dad's Mac though
    I'm a complete spaz. Big time.

    That said, I find folks here really helpful, but sometimes I have to
    back up and say, "OK, I understand the concept but haven't a clue how to
    do what you just said.". Almost always someone will come back
    w/something more specific. Or point me to a document that explains it.
    I suppose that sometimes we fall into the trap of thinking "if I know
    it everybody must"; hence, if you're posting here you must know what
    we're talking about and thus just need a nudge instead of a roadmap.
    It's not that people are unhelpful, they just forget what it's like to
    be fresh from the other camp. But persistence pays off.

    Hardware install issues can be problematic. I haven't had much problem,
    especially with newer distributions but in the past things like network
    cards, or printers could be a bear to get working as there was limited
    vendor support. One had to choose wisely. Now days it's much less of a
    problem, but it pays to do a bit of googling up front to see if there
    are any issues w/a particular piece of hardware.

    There may be a LUG (Linux Users Group near you). If so, avail yourself
    of them. That can be an invaluable resource.

    Not sure what our perl problem was, but perl is a very modular language.
    Most distros have a pretty complete set of perl modules installed, but
    not all. A stock install may or may not have what you need in it. You
    may have to install any missing modules via the package manager that is
    native to your distribution. I'm assuming openSUSE since you're posting
    here, so that would be in YaST. If you don't know what YaST is, or how
    to install software that would be the first question to ask, then move
    on to the perl questions. Too, you can get tons of different perl
    modules from CPAN if they're missing.

    Hope this helps some. FWIW, Linux is mainstream. Just not on the
    desktop. It's the underpinnings of Android, which is currently smoking
    the other mobile phone OSes. It's embedded in a lot of various
    electronic devices but doesn't have the visibility of Windows because
    it's, well, embedded. It powers a significant portion of the internet
    web servers, and a large percentage of servers are Linux based, but
    again you don't see that - you just see what they serve up.

    Best...

    ....Kevin
    --
    Kevin Miller - http://www.alaska.net/~atftb
    Juneau, Alaska
    In a recent survey, 7 out of 10 hard drives preferred Linux
    Registered Linux User No: 307357, http://counter.li.org

  8. #8

    Default Re: Perl

    Never mind.

  9. #9
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,762

    Default Re: Perl

    I guess you solved the problem? Or just gave up?

    Question did you set the file as executable? Nothing runs in Linux unless you set the file permission right.

  10. #10
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Perl

    On 2011-04-10 05:06, DoingThisForever wrote:
    > Is it too much to ask for a step by step instruction on how to convert
    > this script to a usable program & then explain how to run it?


    Yes, you are asking a lot. We are not paid support personnel, we are fellow
    users. We gave you advice but you can't follow it because you can not walk.


    If your script works out of the box, good. If it doesn't, no idea.

    Perl is always installed and working on any openSUSE installation, because
    many things use it. If your script does not work, it is probably the fault
    of your script.


    > This is exactly why Linux will never become a mainstream OS. If
    > someone with my experience asks intelegent questions & has the ability
    > to at least work with the answers can't get decent help what chance does
    > a regular computer user have?


    Linux is mainstream already.

    You are asking how to repair a car without knowing how to handle the
    screwdriver. You are an expert on computers, right; but now you have to
    learn your way around linux.

    So, instead of asking us for a detailed information, please first learn the
    basics. You of all people should know that. I do because I also knew a lot
    of computers and programming when I came to linux, and I hardly knew how to
    edit a file in linux. Don't try to run before you can walk.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •