use strict; my $str = 'some text ()\xA1 file.txt'; my ($desc,$file) = split (/\s*\(\)\\xA1\s*/,$str); print "$desc
\n";