Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

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

When does RAM become an issue?

Sooner or later

How would I adapt this solution to refer to a separate input file?

Read perlintro you can't skip that

What would be the best reference source, for purposes of interpreting the few Perl codes suggested in that solution?

Combine ppi_dumper with Perl documentation / Modern Perl and super search/Tutorials...

$ ppi_dumper code.pl PPI::Document PPI::Token::Comment '#! perl -slw\n' PPI::Statement::Include PPI::Token::Word 'use' PPI::Token::Whitespace ' ' PPI::Token::Word 'strict' PPI::Token::Structure ';' PPI::Token::Whitespace '\n' PPI::Token::Whitespace '\n' PPI::Statement::Variable PPI::Token::Word 'my' PPI::Token::Whitespace ' ' PPI::Token::Symbol '@array' PPI::Token::Whitespace ' ' PPI::Token::Operator '=' PPI::Token::Whitespace ' ' PPI::Token::Word 'split' PPI::Token::Whitespace ' ' PPI::Token::Quote::Single ''term'' PPI::Token::Operator ',' PPI::Token::Whitespace ' ' PPI::Token::Word 'do' PPI::Structure::Block { ... } PPI::Token::Whitespace ' ' PPI::Statement::Variable PPI::Token::Word 'local' PPI::Token::Whitespace ' ' PPI::Token::Magic '$/' PPI::Token::Structure ';' PPI::Token::Whitespace ' ' PPI::Statement PPI::Token::Operator '<' PPI::Token::Word 'DATA' PPI::Token::Operator '>' PPI::Token::Whitespace ' ' PPI::Token::Structure ';' PPI::Token::Whitespace '\n' PPI::Statement PPI::Token::Word 'shift' PPI::Token::Whitespace ' ' PPI::Token::Symbol '@array' PPI::Token::Structure ';' PPI::Token::Whitespace ' ' PPI::Token::Comment '## Discard leading null' PPI::Token::Whitespace '\n' PPI::Token::Whitespace '\n' PPI::Statement PPI::Token::Word 'print' PPI::Token::Whitespace ' ' PPI::Token::Quote::Single ''---'' PPI::Token::Operator ',' PPI::Token::Whitespace ' ' PPI::Token::Quote::Double '"\n"' PPI::Token::Operator ',' PPI::Token::Whitespace ' ' PPI::Token::Magic '$_' PPI::Token::Operator ',' PPI::Token::Whitespace ' ' PPI::Token::Quote::Double '"\n"' PPI::Token::Whitespace ' ' PPI::Token::Word 'for' PPI::Token::Whitespace ' ' PPI::Token::Symbol '@array' PPI::Token::Structure ';' PPI::Token::Whitespace '\n' PPI::Token::Whitespace '\n' PPI::Statement::Data PPI::Token::Separator '__DATA__' PPI::Token::Whitespace '\n' PPI::Token::Data 'term {\nyada yada\n12345\n() ...\n}\n\nterm + only occurs here {\ncould be 30 lines here\nbut never that word agai +n until\nanother block starts\nyadada\n}\n\nterm, etc.'

So operator, __DATA__, local, $_, $_...

Which version of Perl should I install, to run this code?

It will run on any perl that starts with a "5." , anything released in the last 20+ years


In reply to Re: Learning Perl by Doing by Anonymous Monk
in thread Learning Perl by Doing by raywood

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 goofing around in the Monastery: (4)
As of 2024-04-19 00:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found