IO::Simple

Adds error checking to file handles and provides per file handle options
Download

IO::Simple Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Eric Hodges
  • Publisher web site:
  • http://search.cpan.org/~ericjh/

IO::Simple Tags


IO::Simple Description

Adds error checking to file handles and provides per file handle options IO::Simple is a Perl module that provides a thin layer over IO::File. This layer causes files to default to opening in read mode and to croaking on failure opening, closeing or printing to files. It provides methods to set $, $/, $:, $^L and $, on a per handle basis and a slurp function.SYNOPSISYou can export the file method as below use IO::Simple ':all'; my $fh = file('test.txt', 'w'); #dies if file can't be opened $fh->say("This is a line"); #say appends new line $fh->print("This has no new line!!!"); #regular print behavior $fh->close(); #dies on failure my $contents = file('test.txt')->slurp();Or you can use the new class method use IO::Simple; my $fh = new IO::Simple('test.txt'); Requirements: · Perl


IO::Simple Related Software