Am I missing what this is (not) supposed to do? Seems to work fine for me on Windows 7 x64 and Strawberry 5.16.1 (64-bit):
VinsWorldcom@C:\Users\VinsWorldcom\tmp> ver
Microsoft Windows [Version 6.1.7601]
VinsWorldcom@C:\Users\VinsWorldcom\tmp> perl -v
This is perl 5, version 16, subversion 1 (v5.16.1) built for MSWin32-x
+64-multi-thread
VinsWorldcom@C:\Users\VinsWorldcom\tmp> perl test.pl test.pl
$VAR1 = 'use IO::File;
';
$VAR2 = 'use Data::Dumper;
';
$VAR3 = 'my $fh = IO::File->new();
';
$VAR4 = '$fh->open(shift);
';
$VAR5 = 'my @lines = $fh->getlines();
';
$VAR6 = 'undef $fh;
';
$VAR7 = 'print Dumper (@lines);';
-
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.
|