Greetings Monks,
I have a perl script to generate formatted reports out of a text file.
I am using file i/o and regexpressions to do it.
I used PerlCC to convert the perl script into a perl executable
.
But when i try to run the exe , it fails by giving out the following error
"Modification of a read-only value attempted at Monthly_Reports.pl line 5.
*main::PerlIO::"
The line 5 in the perl script is
line 5: my $filename = <STDIN>;
line 6: open (FH,$filename);
line 7: my @Lines = <FH>;
line 8: close FH;
I am just taking the filename and reading from the file.
Please correct me if iam doing something wrong.
I have Perl 5.8.4 on Windows machine.
Ne pointers are greatly appreciated
--Swaroop
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.