So I'm starting to learn Perl..

GEC: Discuss gaming, computers and electronics and venture into the bizarre world of STGODs.

Moderator: Thanas

User avatar
Pu-239
Sith Marauder
Posts: 4727
Joined: 2002-10-21 08:44am
Location: Fake Virginia

Post by Pu-239 »

Crayz9000 wrote:
verilon wrote:
Pu-239 wrote:To create a script under cygwin, try nano [scriptname], then add the stuff at the top and write the contents. You could try notepad/textpad/blah too, but I don't know where you installed cygwin. Emacs is a lot better, but harder to use. The best is obviously vim, however according to some, it turns you crazy (into a Unix nerd who hunts G&C into the middle of the night looking for threads pertaining to *NIX and then replying in a matter of minutes).
Like you? ;)
Like me :P
No, I believe you actually do something useful with your life. I spend hours hitting refresh on G&C and other forums, most often G&C. I think I might have OCD :wink: .

ah.....the path to happiness is revision of dreams and not fulfillment... -SWPIGWANG
Sufficient Googling is indistinguishable from knowledge -somebody
Anything worth the cost of a missile, which can be located on the battlefield, will be shot at with missiles. If the US military is involved, then things, which are not worth the cost if a missile will also be shot at with missiles. -Sea Skimmer


George Bush makes freedom sound like a giant robot that breaks down a lot. -Darth Raptor
User avatar
haas mark
Official SD.Net Insomniac
Posts: 16533
Joined: 2002-09-11 04:29pm
Location: Wouldn't you like to know?
Contact:

Post by haas mark »

Pu-239 wrote:
verilon wrote:Ok so now how do I run the damn thing?
Clicking the cygwin icon should give you a bash shell. Type "rxvt -fg gray -bg white" should give you another shell. If it's not bash, or does not behave like bash, hit enter. Typing info bash is suggested, though not required. Type "nano programname" and type in

Code: Select all

#! /bin/perl -w -T
use strict;

[your stuff here]
Keyboard commands for nano are listed at the bottom- ^ means control.

To run, chmod +x programname, then run with ./run . Most of this stuff should be covered in your perl book.
Actually, the damned perl book assumes that you know this much about your environment. As do the other four I saw at B&N.

Now, to create a script from scratch, what will I do?
Robert-Conway.com | lunar sun | TotalEnigma.net

Hot Pants à la Zaia | BotM Lord Monkey Mod OOK!
SDNC | WG | GDC | ACPATHNTDWATGODW | GALE | ISARMA | CotK: [mew]

Formerly verilon

R.I.P. Eddie Guerrero, 09 October 1967 - 13 November 2005


Image
User avatar
Pu-239
Sith Marauder
Posts: 4727
Joined: 2002-10-21 08:44am
Location: Fake Virginia

Post by Pu-239 »

Um, I just told you in the post you were replying to. Follow the instructions.
"nano" is the text editor. A Perl script is simply a text file intended to be interpreted by perl, with executable permissions.

ah.....the path to happiness is revision of dreams and not fulfillment... -SWPIGWANG
Sufficient Googling is indistinguishable from knowledge -somebody
Anything worth the cost of a missile, which can be located on the battlefield, will be shot at with missiles. If the US military is involved, then things, which are not worth the cost if a missile will also be shot at with missiles. -Sea Skimmer


George Bush makes freedom sound like a giant robot that breaks down a lot. -Darth Raptor
User avatar
haas mark
Official SD.Net Insomniac
Posts: 16533
Joined: 2002-09-11 04:29pm
Location: Wouldn't you like to know?
Contact:

Post by haas mark »

Pu-239 wrote:Um, I just told you in the post you were replying to. Follow the instructions.
"nano" is the text editor. A Perl script is simply a text file intended to be interpreted by perl, with executable permissions.
Oh, ok. -very confused- It seemed that that was to run a Perl script. My apologies.
Robert-Conway.com | lunar sun | TotalEnigma.net

Hot Pants à la Zaia | BotM Lord Monkey Mod OOK!
SDNC | WG | GDC | ACPATHNTDWATGODW | GALE | ISARMA | CotK: [mew]

Formerly verilon

R.I.P. Eddie Guerrero, 09 October 1967 - 13 November 2005


Image
Post Reply