#! /usr/local/bin/perl -w #----------------------------------------------- use strict; use warnings; while(<>) { next unless m/ ^(\d+) # Match the number \s+ # Match spaces after number \S+? # Minimally match path ([^\/]+)$ # Match everything after the last slash /x; my ($linesOfCode,$filename)=($1,$2); # Access captured text print "$linesOfCode, $filename\n"; }
In reply to Re: parse
by mp
in thread simple parse question
by Sara
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |