in reply to Re^4: Delete a line from the file
in thread Delete a line from the file
Since you are in single-quotes, attempting to escape the $ using \$ causes the $ to be interpreted literally by perl where you did not intend.
Specifically, I think you intended perl to see "$var" , but you have a "\" preceding the $ , and that \ is passed to perl, so perl thinks you want a literal $var, instead of interpolating.
Here is how perl currently sees your re:
You need to remove all attempts to escape all $'s in front of variable names.s#\Q(.*)\$/',\$lines,\$matches))10.(.*)\$/',\$lines,\$matches))(.*)\ +$/',\$lines,\$matches))# #gi
Update:The problem is that \Q interpolates and disallows \$ - see my response below.
Have you been high today? I see the nuns are gay! My brother yelled to me...I love you inside Ed - Benny Lava, by Buffalax
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Delete a line from the file
by ajd335 (Novice) on Jul 16, 2008 at 23:37 UTC | |
by NetWallah (Canon) on Jul 17, 2008 at 06:11 UTC | |
by Anonymous Monk on Jul 17, 2008 at 16:20 UTC |