in reply to Deciphering $data

I'm not sure I understand your question, but I suspect the answer is that you need to use double quotes (") to interpolate the contents of $data into the string you are building. I'd do it like:

my $data_brf = "$data_dir\\$data\.brf";
True laziness is hard work

Replies are listed 'Best First'.
Re^2: Deciphering $data
by Anonymous Monk on Apr 01, 2012 at 07:00 UTC

    Basically I want to append "$data.brf" to "$data_dir" and then print it,so am I am trying to interpolate $data,if I use the way you suggested..I am not able to append...

    $data_brf=$data_dir.'\\$data\.brf'; print "$data_brf";

      I suggest you copy and paste the code I gave earlier. It is not what you implied I suggested. Consider:

      use strict; use warnings; my $data_dir = 'c:\\Wibble'; my $data = 'Plonk'; my $data_brf = "$data_dir\\$data\.brf"; print "$data_brf\n";

      Prints:

      c:\Wibble\Plonk.brf

      If that is not what you want you better show us the contents of $data_dir and $data, and show us what you expect to see printed.

      True laziness is hard work