Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: regex problem

by rnaeye (Pilgrim)
on Nov 04, 2010 at 01:05 UTC ( #869374=note: print w/replies, xml ) Need Help??

in reply to regex problem

Try this.
#!/usr/bin/perl use strict; use warnings; use 5.010; while (<DATA>){ my ($name,$num,$addr,$date,$n) = split(/:/, $_); $name ~~ s/William Kopf/Siegfield/ig; print "$_"; }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://869374]
[choroba]: You need square brackets for arrays
[GotToBTru]: you can certainly construct a single expression to access any part of the data structure, without using temp variables. but you might make it easier on yourself and any other poor soul who has to understand your code if you do
[thepkd]: to dereference i mean
LanX .oO( oh tempz, oh moretz)
[thepkd]: @GotToBTru Sure. But.
choroba waits

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (13)
As of 2016-12-06 13:27 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (104 votes). Check out past polls.