#!/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
In reply to Re: Make a variable safe for a regex.
by jesuashok
in thread Make a variable safe for a regex.
by exodist
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |