[Omaha.pm] Perl question

Wendy Moroz wmoroz18 at gmail.com
Fri Mar 19 09:50:33 PDT 2010


Thanks Sterling - the -c is helpful, I found one syntax error using that.

2010/3/19 Sterling Hanenkamp <sterling at hanenkamp.com>

> Just to muddy the waters, you could run hello world from vim, if you
> wanted. Like this:
>
> <esc>:!perl assignment_6
>
> It will show the output and ask you to press enter to get back to editing.
> You can also run the current file by using "%" as your file name.
>
> <esc>:!perl %
>
> I find this especially useful with the "-c" option which checks to see if
> the perl file can run (though, not whether it will run correctly):
>
> <esc>:!perl -c %
>
> That's a nice quick check for typos.
>
> Cheers.
>
>
> 2010/3/19 Wendy Moroz <wmoroz18 at gmail.com>
>
>> Ahhhh....thank you Nicholas!  THAT'S what I was doing wrong.......I
>> thought I needed to run the command inside of VIM.  Thanks so much!!
>>
>> 2010/3/19 Nicholas Nisi <nicknisi at gmail.com>
>>
>> You shouldn't be trying to get it to print from inside VIM. VIM is used to
>>> edit the file. Then, you try running it from the command line (where you
>>> typed "VIM" into) using the command "perl assignment_6" (without quotes). If
>>> your program is correct, you will see "Hello World" appear below.
>>>
>>> Thanks,
>>>
>>> Nicholas J. Nisi
>>> nicknisi at gmail.com
>>> nicknisi at gwu.edu
>>>
>>>
>>>
>>> 2010/3/19 Wendy Moroz <wmoroz18 at gmail.com>
>>>
>>>> I am using UNO's Blizzard account.  I have the file saved as "assignment
>>>> 6".  I then VIM assignment 6, and that is where I am trying to get it to
>>>> print.  Is this not correct?   Sorry, I am really confused here.  :(
>>>>
>>>>
>>>> On Fri, Mar 19, 2010 at 1:15 AM, Andy Lester <andy at petdance.com> wrote:
>>>>
>>>>>
>>>>> On Mar 19, 2010, at 1:12 AM, Wendy Moroz wrote:
>>>>>
>>>>> > Hi - this is my first time asking a question, so I am not sure if I'm
>>>>> doing this right.
>>>>> >
>>>>> > I am a new Perl user - this is my very first attempt at trying to run
>>>>> a Perl command.  It is for my class, and I really need some help.
>>>>> >
>>>>> > I have the file chmod'ed so I am able to execute commands.  I also
>>>>> have the shebang, strict, and warnings lines entered and everything is typed
>>>>> correctly.
>>>>> >
>>>>> > I tried the "Hello World" line by entering this:   print "hello
>>>>> world. \n"
>>>>> >
>>>>> > When I key that in, nothing happens.  This seems like an incredibly
>>>>> easy command, yet for the life of me I can't figure out what am I doing
>>>>> wrong??  When you ask Perl to output (print) something, how/where is it
>>>>> supposed to show up?
>>>>>
>>>>> You have it keyed in where?  Do you have all this saved in a file?
>>>>>  What's the file called?
>>>>>
>>>>> You want to save all this in a file called, for example, "hello.pl".
>>>>>  Then, you run it by running "perl hello.pl".  What OS are you on?
>>>>>
>>>>> xoa
>>>>>
>>>>>
>>>>> --
>>>>> Andy Lester => andy at petdance.com => www.theworkinggeek.com =>
>>>>> AIM:petdance
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Omaha-pm mailing list
>>>>> Omaha-pm at pm.org
>>>>> http://mail.pm.org/mailman/listinfo/omaha-pm
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Omaha-pm mailing list
>>>> Omaha-pm at pm.org
>>>> http://mail.pm.org/mailman/listinfo/omaha-pm
>>>>
>>>
>>>
>>> _______________________________________________
>>> Omaha-pm mailing list
>>> Omaha-pm at pm.org
>>> http://mail.pm.org/mailman/listinfo/omaha-pm
>>>
>>
>>
>> _______________________________________________
>> Omaha-pm mailing list
>> Omaha-pm at pm.org
>> http://mail.pm.org/mailman/listinfo/omaha-pm
>>
>
>
>
> --
> Andrew Sterling Hanenkamp
> sterling at hanenkamp.com
> 785.370.4454
>
> _______________________________________________
> Omaha-pm mailing list
> Omaha-pm at pm.org
> http://mail.pm.org/mailman/listinfo/omaha-pm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/omaha-pm/attachments/20100319/3f5930f0/attachment.html>


More information about the Omaha-pm mailing list