in reply to regular expression to get the tablename.column_name

Hardly the shortest, but below is a one line version obtained using very basic simplifications of your code ($_ =~ eliminated. while (<STDIN>) replaced with the n command line option. $ and \n replaced with the l command line .)
perl -nle "/TABLE;(.*)/?($t=$1):/COLUMN;([^;]*)/&&print qq{$t.$1}"

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

    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.

      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($,,$;,$*,$/)