http://www.perlmonks.org?node_id=527706

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(;;);