http://www.perlmonks.org?node_id=992833


in reply to Dealing with '@' in Text Strings

To split this string into two seperate email values stored in an array, you can use the split() function which takes two arguemnts. The delimiter on which to seperate the original string ( in your case it looks like your using a comma ) and the string itself. To turn @ into a literal, use single quotes for $x or excape them with \@:

my $x = 'jdoe@somewhere.com,bdoakes@nowhere.com'; my @list = split(/,/,$x); # /,/ specifies the delimiter