Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: regex question

by leriksen (Curate)
on Mar 23, 2004 at 02:53 UTC ( #338873=note: print w/replies, xml ) Need Help??


in reply to regex question

Same as graff but focussing solely on the hash solution - I also didn't worry about spaces after the split determinants

#!/usr/bin/perl -w use strict; my %data = split(/[:;]/, 'font-family: Verdana, Arial, Geneva, san-ser +if; font-size: .69em; color: #666666'); use Data::Dumper; print STDERR Dumper(\%data);
Output
$VAR1 = { 'font-family' => ' Verdana, Arial, Geneva, san-serif', ' color' => ' #666666', ' font-size' => ' .69em' };

+++++++++++++++++
#!/usr/bin/perl
use warnings;use strict;use brain;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2022-08-14 12:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?