Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

pudge (1)

  (email not shown publicly)
AOL IM: Crimethnk (Add Buddy, Send Message)

I run this joint, see?

Journal of pudge (1)

Tuesday February 12, 2002
03:03 PM

This is a test

[ #2824 ]

Please ignore it. I am testing the new SOAP interface for journals, where I can do this:

#!/usr/bin/perl -w
use strict;
use HTTP::Cookies;
use SOAP::Lite;
my $host        = '';
my $uri         = "http://$host/Journal";
my $proxy       = "http://$host/";
my $cookie_file = "$ENV{HOME}Netscape Users:Chris Nandor:MagicCookie";
# first line is subject
chomp(my $subject = <>);
my $text = join '', <>;
(my $newtext = $text) =~ s/\n/\012/g;  # Local to Unix newlines
my $cookie_jar  = HTTP::Cookies::Netscape->new;
my $journal = SOAP::Lite->uri($uri)
                        ->proxy($proxy, cookie_jar => $cookie_jar);
$journal->add_entry($subject, $newtext);
# print text back to original window
print $subject, "\n", $text;