|
IO::Extended - more print functions |
IO::Extended - more print functions
use IO::Extended ':all';
printl 'foo bar';
println 'foo bar';
printfln 'foo %s', 'bar';
$str = sprintfln 'foo %s', 'bar';
warnfln 'foo %s', 'bar';
diefln 'foo %s', 'bar';
tabs 5;
ind 1;
indn;
indb;
indstr;
IO::Extended contains a bunch of print-like functions, which automatically add newline characters to the string.
None by default.
This functions of this module need to be exported before use. Use the ':all' syntax for automatically adding the complete set.
space x ( indentation * tabsize ).
warn, but accepts a FORMAT string like printfln.
die, but accepts a FORMAT string like printfln.
Barely all format is forwared to the perl internal printf like functions, but one is translated.
%S or %D in the format string will get translated to '%s' or '%d'. It should help writing
printfln "Your given string %S is broken.", $string;
[Note] $string could contains confusing whitespaces, for example.
By author. Ask comp.lang.perl.misc or comp.lang.perl.module if you have very general questions.
If all this does not help, contact me under the emailadress below.
Murat Uenalan, muenalan@cpan.org
Copyright (c) 1998-2002 Murat Uenalan. Germany. All rights reserved.
You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.
perl(1). perlfunc
|
IO::Extended - more print functions |