[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] News postings and suchlike



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 9:17 AM -0500 3/27/98, aq@snow.btinternet.com wrote:

} I'm attempting to write a script that will read in data from a file,
}output some of that data (depending on the date) to a message, and then
}post that message to a newsgroup.

As Chris said, use Net::NNTP.  If you're using a recent MacPerl, it's
sitting right on your disk.  The only caveat is that if your provider's
news server isn't named "news" in the same domain as you, you may need to

$ENV{NNTPSERVER} = "whatever";

in your script.  If you have a single provider and you're using Internet
Config, MacPerl will ask Internet Config for your NNTP host, so you won't
have to worry about this.


} >From what I can see of Perl, it should be possible.
} However, having briefly looked at ordinary Perl scripts, they seem to use
}a lot of unix-based things, such as getting the hostname using
}$hostname=`/etc/hostname` and suchlike, which doesn't work on a Mac. :-)

No, but $hostname = `hostname` does.

}
} So, two things:
} Firstly, is this possible in MacPerl? (I would be surprised if not)
} Secondly, can someone give me some pointers as to how to do this sort of
}thing? A pointer to a previously existing MacPerl auto-news-posting
}script, or basic suggestions, are what I'm looking for here, not someone
}else to do it for me, since Perl seems rather useful so I'd like to learn
}it :)
}
} Aquarius (aquarius@cryogen.com)
} ---------------------------
}
- -----
Paul J. Schinder
schinder@pobox.com

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBNRvCXVZaVc52j0XhEQLc9gCfUgiJNFr3AMqCV0DbitfsjVYAKbYAnRWu
xixQJSvBwBj5PLgM8oY6jugH
=AWup
-----END PGP SIGNATURE-----

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch