
princepawn
Novice
Dec 18, 2000, 9:52 AM
Views: 1076
|
|
Extracing tab-separated fields
|
|
|
I have six fields which are tab-separated. My regular expression succesfully matches them, but I don't know of an easy way to get out all of the fields:
use strict; open G, 'genres.txt'; while (<G>) { if (/(.*)([\t].*){5}/) { warn sprintf "s: $_ l: %d", length $_; } }
(This post was edited by japhy on Dec 18, 2000, 11:23 AM)
|