yunglean808 has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks! I have a perl script that is called gogo.pl and it is located in /root/Documents. This script opens a directory and extracts certain file types within that directory. The directory is called 67865 and it is stored in /root/Documents. How would I run this perl script on this folder. I am new to this bc it isn't the same as running a script from the Windows Command Prompt. Thank you in advance.

Replies are listed 'Best First'.
Re: Executing a perl script in PuTTY
by SquirrelHead (Novice) on Jul 24, 2015 at 15:40 UTC

    If you are in the folder where the script is located then the easiest way is:

    ./gogo.pl

    Alternatively, you can call the file using the full name:

    /roots/Documents/gogo.pl

    Regards

Re: Executing a perl script in PuTTY
by Corion (Patriarch) on Jul 24, 2015 at 15:21 UTC

    Where does PuTTy come into play here?

    Most likely you want to open whatever the local version of a command prompt is. Most commonly, this is called a "shell window" or a "terminal window". There you can execute your script as if you were running it from the Windows Command Prompt.

      PuTTY is what I prefer, but that is irrelevant. I just want to know the commands that are necessary for a successful execution.

        I would assume that the commands are roughly the same as they would be in Windows Command Prompt. But why do you mention PuTTy if you think it is irrelevant?

        Most likely, you should get to your goal by entering:

        perl -w /roots/Documents/gogo.pl /roots/Documents/67865