SPUG: sending emails

Michael R. Wolf MichaelRWolf at att.net
Wed Feb 21 21:35:26 PST 2007

> # Read email content
> my $cont_file = shift @ARGV or die "error: give the name of the file
> content";
> open(my $content_fh, "<", $cont_file);
> my $content = do { local $/; <$content_fh> };
> close $content_fh;

You localized, but did not change, the input record separator.  Try:

    use English qw(-no_match_vars);
    my $content = do { local $INPUT_RECORD_SEPARATOR = undef; <$xml_fh>; }

Of course, you could use non-english, and keep it at $/ (or is it $\? -- are
you sure?).  The important part is to set it to undef.


More information about the spug-list mailing list