Hmm. I've tried that code as well. The "strict" and "warnings" commands are very helpful indeed. It's pointing out some mysterious errors on a particular line:
Possible unintended interpolation of @whatever in string at myscript.pl line 158.
Possible unintended interpolation of @whatever in string at myscript.pl line 158.
Global symbol "@whatever" requires explicit package name at myscript.pl line 158.
Global symbol "@whatever" requires explicit package name at myscript.pl line 158.
Execution of myscript.pl aborted due to compilation errors.
The line in question is a simple print command immediately following the last line of the code I am posting. Line 157 is the system() command causing all the trouble...
use strict;
use warnings;
my $address = 'myemail@whatever.com';
my $subject = 'Comments Version: $version ID: $ID';
# backslash the @ sign in the address
$address =~ s/@/\\$1/g;
system( "mail $address -s $subject < blah6.txt" ) == 0
or die "mail failed: $?";
By the way, $ID is a 10-character alphanumeric string, and $version is something like "5.3" or "5.4" or "Nightly" (sans quotes, of course).
Any thoughts? I appreciate all the help so far, by the way. I'm a self-professed perl newb, and can use all the suggestions I can get. Thanks!
--blanket
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.