solution
im sorry, my script is so long, the error is from another place, the tags do work alone. Thanks for your help, and again i apoligize.
at the end of my script was something like...
sub help {
//the rest of the code was gone, because i had copied and pasted to th
+e top of the script.
UPDATE: It doesnt work for me (EOF tags)
sub help() {
print <<"EOF";
Possible Starting Arguments for ldapadmin:
blah blah
EOF
}
I get this error:
dark314@chavez:~/boxes/scripts/csl-ldap-01$ ./ldapadmin -help
Missing right curly or square bracket at ./ldapadmin line 896, at end of line
syntax error at ./ldapadmin line 896, at EOF
Execution of ./ldapadmin aborted due to compilation errors.
sorry if this seems very easy, but its bugging me because I know there should be some better way of doing it.
ok, so heres the deal: I have a textfile, with tabstops in it, its a helpfile for a script of mine which is written in, you guessed it,
perl. Originally I had the perl script make a system call to cat <name of file> but given the small size of the script, i'd rather it inside the script, perhaps in a subroutine called help(), i was thinking of adding something like this:
print "
//paste help text here which was copied
";
but i know this is a bad approach and im sure it doesn't work.
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.