in reply to Deciphering $data

I am trying to decode the value in "$data"

What you're trying to do is interpolate $data, or append it to $data_brf

Since single quotes do not interpolate, you get a literal $data instead of the contents of $data (interpolation)

As perlintro tells us, double quotes interpolate, so use double quotes

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

 $data_brf = qq{$data_dir\\$data\.brf};

 $data_brf = qq[$data_dir\\$data\.brf];

 $data_brf = qq<$data_dir\\$data\.brf>;

 $data_brf = qq($data_dir\\$data\.brf);

 $data_brf = qq'$data_dir\\$data\.brf';

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

    My goal is 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 suggested you use double-quotes, I showed you six different ways, simply copy and paste one of them