Since this is a conrtived example...here is my other contrived example. Not to say IO::All isn't cool, i think many of us are just bigger control freaks and can't stand to guess what the module will do and if it will do the right thing.
use File::Spec;
open (MYFILE, '<', File::Spec->catfile('my','dir','my_file.txt')) or d
+ie "Can't open $file: $!\n";
open(RFILE, '>', File::Spec->catfile('my','dir','reversed.txt')) or di
+e "Can't open $rfile: $!\n";
print RFILE reverse <MYFILE>;;
use IO::All;
my $file = io->catdir('my','dir','my_file.txt')->backwards;
my $rfile = io->catdir('my','dir','reversed.txt');
$file > $rfile;
Now if it was IO::DBD::All....just feed it a daatabase and a file of any format and ti does the right thing....well then i might not have much of a job so lets not go there.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.