[northwestengland.pm] Newbie question
i.d.norton at gmail.com
Tue Jun 21 09:49:21 GMT 2011
> I hope an absolute newbie plea for a few friendly shoves in the right
> direction won't be unwelcome here. :)
Absolutely, you're very welcome here.
> I'm trying to convert a long list of filters from failbird format to
> exim - see: http://pastebin.ubuntu.com/630072/
> Basically, a parse file a for:
> * listname
> * TLD
> * relevant section of server path
> and print into new file, line by line.
Hmm, I'm not sure that line by line would be the way forward for this
as you need to read ahead to the end of the block before you print it
My approach would be to read the whole thing into memory and then spit
it out again once you've done any processing you need. I'll start you
off with the reading in part:
Of course, there's more than one way to do it... :)
> As I said, I'm completely finding my feet here and nothing here is
> naturally "obvious" so to speak.
> http://perl.about.com/od/filesystem/a/perl_parse_tabs.htm makes sense,
> but clearly only is very much the scratching the surface.
> Clearly http://oreilly.com/catalog/perlwsmng/chapter/ch08.html is
> relevant, but probably a bit heavy for my purposes?
> Does anyone have any suggestions of something to read to get started?
This would be easier on IRC :) irc.perl.org #northwestengland.pm
Co-Leader North West England Perl Mongers (http://northwestengland.pm.org/)
Co-Membership Secretary Sing for Pleasure (http://www.singforpleasure.org.uk/)
More information about the northwestengland.pm