I'm working on a simple little Perl script for a class of mine. Essentially it consists of a simple HTML Order Form that passes data to the Perl script via POST. The script then generates a typical confirmation page. The Perl interperter is giving me the following error: "Quantifier follows nothing before HERE mark in regex m/+ << HERE / at order.pl.cgi line 14"
The following block of code contains line 14. It is taken directly from my textbook, so for the life of me, I don't know why it would be generating the error:
for ($i=0; $i < $size; $i++){ #11
($key, $value) = (split /=/, $fields[$i]); #12
$value =~ s/[;<>\(\)\{\}\*\|'`\&\$!#:"\\]/\ $1/g; #13
$value =~ s/+/\ $1/g; #14
$hash{$key} = $value; #15
}
#16
The complete script can be viewed by downlading the attachment at the top of this
thread.
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.