Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Complete novice in need of guidance

by GrandFather (Saint)
on Oct 02, 2016 at 21:49 UTC ( [id://1173126]=note: print w/replies, xml ) Need Help??


in reply to Complete novice in need of guidance

If you are using a Mac (implied by Xcode) open terminal window and type:

perl -v

That should get you something that looks a little like:

This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x +86-multi-thread (with 1 registered patch, see perl -V for more detail) Copyright 1987-2012, Larry Wall Binary build 1603 [296746] provided by ActiveState http://www.ActiveSt +ate.com Built Mar 13 2013 11:29:21 Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge.

The details will be different because I'm using a Windows machine so my Perl was build for Windows, but that doesn't matter much. If that worked, cd to somewhere you can create files (your home directory ~ would be a reasonable place) and type: nano hello.pl then press return. In the nano editor enter:

#!/usr/bin/perl use strict; use warnings; print "Hello World\n";

Press Ctrl-X then Y and return to exit and save your changes to the file hello.pl. Type perl hello.pl then return. You have now written and run your first Perl program. For extra points you can chmod ug+x hello.pl to make the script executable without needing to use the Perl interpreter directly. You can then just ./hello.pl.

You should now be in a position to run examples and do exercises from the book.

Premature optimization is the root of all job security

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-19 03:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found