#!/usr/bin/perl -w use strict; use WWW::UsePerl::Journal; my $subject = <>; chomp $subject; my $entry = join( '', <> ); my $j = WWW::UsePerl::Journal->new('fred'); $j->login('xxxx'); $j->postentry( title => $subject, text => $entry, );
[updated with petdance's changed]
tomy $file = shift;
die unless defined $file and length $file;
my $subject;
my $entry;
{
open my $fh, $file or die "Cannot open $file: $!\n";
$subject = <$fh>;
$entry = join('', <$fh>);
close($fh)
}
chomp $subject;
Magical @ARGV processing is your friend!my $subject = <>;
chomp $subject;
my $entry = join( '', <> );
Re:Why open manually?
koschei on 2002-09-18T01:38:41
Erm. It's an artefact that I should've removed. The program used to do much more. Then I realised the other features were irritating me.