Split string on multiple character delimeters
From: Aaron DeLoach (aaron_at_deloachcorp.com)
Date: 02/24/04
- Next message: Robert Nilsson: "Displaying images thats stored in Oracle database in CGI script"
- Previous message: Uri Guttman: "Re: finding common words"
- Next in thread: Anno Siegel: "Re: Split string on multiple character delimeters"
- Reply: Anno Siegel: "Re: Split string on multiple character delimeters"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 24 Feb 2004 13:53:07 -0600
I am trying to split a string based on a multiple character delimiter and
place it into a hash. After a few hours I came up with the following:
my $str = "color%=red%;lang%=engl";
my %hash = split /%;|%=/, $str, -2;
It works, but I would like to know if it's the right method :-)
- Next message: Robert Nilsson: "Displaying images thats stored in Oracle database in CGI script"
- Previous message: Uri Guttman: "Re: finding common words"
- Next in thread: Anno Siegel: "Re: Split string on multiple character delimeters"
- Reply: Anno Siegel: "Re: Split string on multiple character delimeters"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]