Rechercher une page de manuel
Sprog::Gear::PerlCodePH.3pm
Langue: en
Version: 2005-07-24 (mandriva - 01/05/08)
Section: 3 (Bibliothèques de fonctions)
Sommaire
NAME
Sprog::Gear::PerlCodePH - convert 'pipe' data to 'record' data via Perl codeDESCRIPTION
This gear is for converting line-by-line input to records of named field values. It allows the user to define a snippet of Perl code that will implement the conversion for each line of input. The code snippet is wrapped with a small amount of boilerplate code similar to the following:$_ = $input_line; %rec = (); LINE: { # Perl snippet inserted here $self->msg_out(record => \%rec) if %rec; }
There is no default conversion, so if the code snippet does not assign to @rec then no output message will be generated.
For consistency with other PerlCode gears, the scalar $r contains a reference to the %rec.
COPYRIGHT
Copyright 2004-2005 Grant McLean <grantm@cpan.org>This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre