Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Parsing Names in a Text File

by mothra (Hermit)
on Jun 15, 2001 at 20:08 UTC ( #88825=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    open(CUST, "cust_info.txt");
    while (<CUST>) { print ((split ('\|'))[1], "\n"); }
    
  2. or download this
    open(CUST, "cust_info.txt");
    while (<CUST>) {
    ...
        $full_name =~ s/(\w)\w*\s+(.+$)/$1. $2/;
        print $full_name, "\n";
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://88825]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2022-08-12 17:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?