Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Parsing issues

by Athanasius (Abbot)
on Nov 16, 2012 at 02:44 UTC ( #1004103=note: print w/ replies, xml ) Need Help??


in reply to Parsing issues

split treats its second argument as a string (i.e. a scalar), so you need something like this:

my @differenthtml = split /htmlpagemark/, join('', @lines);

Two additional points (with apologies if they’re unnecessary):

  1. The first element of an array is at index 0, not 1 as suggested by the print statements.

  2. Always — yes, always! — begin your script with:

  3. use strict; use warnings;

Hope that helps,

Athanasius <°(((><contra mundum


Comment on Re: Parsing issues
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1004103]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (14)
As of 2015-07-28 09:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (254 votes), past polls