Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

First of all, you don't have to open DATA to read from it. Also, without looking it up or testing it, I'm not too sure what these two lines, in this combination, are supposed to do:

open my $in, "<", $infile; open(DATA,$in);
but it looks wrong to me. Would you care to elaborate as to what your intensions were here?

The next thing that strikes me as odd is the ins split /,\s*/ for <DATA>; line: where is ins defined? Is it imported from somewhere? Did you forget to include the relevant use ...; statement or the actual subroutine itself? Because as is, your code won't even run without an error message regarding this line.

Not to mention the fact that your code has use strict; and then uses an undeclared variable:

C:\Users\Lona\Desktop>perl x.pl syntax error at x.pl line 15, near "ins split" Global symbol "%group" requires explicit package name at x.pl line 16. Execution of x.pl aborted due to compilation errors. C:\Users\Lona\Desktop>

In reply to Re: Unable to write output to file taken as input from command line by muba
in thread Unable to write output to file taken as input from command line by zing

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • 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.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-19 01:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found