>>>>> "SLY" == Selector, Lev Y <[EMAIL PROTECTED]> writes:
SLY> ($sql =<<EOF) =~ s/^\s+SQL: ?//gm; SLY> SQL: select row_id SLY> SQL: from gs_employee_queue g_q SLY> SQL: where g_q.YYYYMMDDHHMM = '$YYYYMMDDhhmm' SLY> SQL: and g_q.action = 'D' SLY> SQL: and g_q.status = 'Unprocessed' SLY> EOF SLY> Question: How to construct the regex so that it subtracts the SLY> same amount of white space from all the line. Namely, it should SLY> memorize the space from the first line only - and then subtract SLY> it from all the lines. why remove the white space? it is perfectly legal in SQL to have extra white space. SLY> I know how to do this with 2 regexes. But is there a way to do it in the SLY> same one substitute (similar to how it is done above)? the perl cookbook recipe 1.11 covers this very topic uri -- Uri Guttman ------ [EMAIL PROTECTED] -------- http://www.stemsystems.com ----- Stem and Perl Development, Systems Architecture, Design and Coding ---- Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org