jeffa,
This is REAL quick (and I am quite a beginner with OO Perl).
I am wondering if the "complaint" I got for my code (which gave me the desired results) is benign.
Here's the code:
#!/usr/bin/perl -w
use strict;
use warnings;
use Tie::File;
my $MAXSAVE = 5;
my $name = "Duane Wade";
my $subject = "My Career";
my $message = "No one ever thought I'd be this good.";
my $myTieObject = tie my @messagesIn, 'Tie::File', 'messageTest2.txt'
+or die "can't open\n";
$myTieObject->flock;
unshift @messagesIn, "$name|$subject|$message";
if (@messagesIn > $MAXSAVE)
{
@messagesIn = @messagesIn[0 .. $MAXSAVE - 1];
}
untie @messagesIn;
1;
And here's the complaint:
untie attempted while 1 inner references still exist at ./messageTest2.pl line 21 <FH> line 16.
Line 21 is the untie line and Line 16 is the if statement.
Other than that, I am all set and much obliged!
Tony
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.