in reply to Make a variable safe for a regex.
#!/usr/bin/perl use strict; my $Artist = 'Trance[]Control'; while ( <DATA> ) { chomp; my $line = $_; $line =~ s,^\b\Q$Artist\E\b\s*-\s*,,ig; print ":$line:\n"; } __DATA__ Trance[]Control - jesuashok [download]