in reply to simple parse question
#! /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"; }
|
|---|