On Jan 16, 2008 7:06 AM, Mike Martin <[EMAIL PROTECTED]> wrote: > Hi I am trying to extract about 10 lines of C code from a file.
> print <something> if $source=~/$diff/sg > > which gives no output That implies that the pattern didn't match. (Do you know what the /g option is doing there? You probably don't want it. I'm suspicious of the /s as well.) Are you trying to write a single pattern that will identify a particular ten lines of C code? That could really be a hard pattern to write correctly on the first try. Of course, since you haven't told us what's in $source or $diff, or what you're trying to print, there's no telling what's really going wrong. (Could $diff be the contents of an actual diff file, i.e. a patch file? That's not going to work....) What are you really trying to accomplish? Can you boil your problem down to a short yet complete example program that other people could run to see what you're trying? Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/