in reply to Re: regular expression to get the tablename.column_name
in thread regular expression to get the tablename.column_name

perl -nle "/TABLE;(.*)/?($t=$1):/COLUMN;([^;]*)/&&print(qq{$t.$1})" fi +le1.txt
compli error
syntax error at -e line 1, near "(=" Execution of -e aborted due to compilation errors.

Replies are listed 'Best First'.
Re^3: regular expression to get the tablename.column_name
by chargrill (Parson) on Oct 18, 2006 at 04:08 UTC

    If you're on windows, use double quotes. *nix variant, single quotes. You obviously want:

    perl -nle '/TABLE;(.*)/?($t=$1):/COLUMN;([^;]*)/&&print(qq{$t.$1})' fi +le1.txt


    --chargrill
    s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)