I'm really embarassed for asking this. Or this could be another case of failing to RTFM.
I'm writing a little program to monitor my disks on my laptop, because I'm never too sure of the GUI tools on my CentOS/Gnome install. So I want to write a little Perl script to notify me when my disks are safe to remove, and I'm a noob writing scripts to learn. Since I heard that coding is one of the best ways to learn programming skills, and reading other code.
Anyway, I choose to write a little script to try my skills at working a little event loop, since my program will require some form of event loop.
Scratchpad
http://perlmonks.org/?node_id=880110
I set some loop control variables, and then I go into my loop to write some noob-code to play around with the event loop. But my Perl interpreter keeps saying that '=: command not found'. So I can't define my loop control vars. I did use any lexical vars since this was supposed to be a quick and dirty little thing, but now it's been about two hours and I'm trying to make dinner at the same time.
Also, I tried to do a multi-line comment to layout my pseudo-code, but perl would not accept my comments in code when I used:
=for comment
hey my comments go here along with some pseudocode:
awesome_code( $var12 ) unless ( $response == 1 );
=cut
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.