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

Regex to match a line

by Win (Novice)
on Feb 03, 2006 at 16:08 UTC ( [id://527706]=perlquestion: print w/replies, xml ) Need Help??

Win has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Regex to match a line
by Fletch (Bishop) on Feb 03, 2006 at 16:16 UTC
Re: Regex to match a line
by davido (Cardinal) on Feb 03, 2006 at 16:53 UTC

    Here's a split example:

    my( @match_A ) = split /\t/, $line;

    Just a matter of using the right tool for the job.


    Dave

      Then you could verify if there are enough items on array:
      if ($#mach_A < 41) { # Less columns than expected. warn "Line has less columns than expected."; }

      Igor 'izut' Sutton
      your code, your rules.

      A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Regex to match a line
by murugu (Curate) on Feb 03, 2006 at 16:31 UTC

    Hi Win,

    What you need is split function.

    Regards,
    Murugesan Kandasamy
    use perl for(;;);

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://527706]
Approved by Tanktalus
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-25 15:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found