CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Regular Expressions: Extracing tab-separated fields: Edit Log



princepawn
Novice

Dec 18, 2000, 9:52 AM


Views: 1764
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:


Code
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)


This post has not been edited


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives