in reply to Accessing data present in a text file with references...

when you turn the strictures on, they give you warnings as long as you don't declare your variables with the "my" keyword, this serves to localize the variables to the current scope. "my" use can be wide-spread but there are other keywords out there ours and local. You can readily find out many discussions involving the conditions each one of these is used under.

So you could have declared the variables "$data", "@svr_raw" by preceding them with the "my" keyword, that would've given you hints that @svr_raw has been declared as an array but then you used a hash ref.

The module Data::Dumper is used to stringify data structures, (i.e it represents the strings that a data structure - when appropriately referenced- would show), hence you can look at the dumped structure and make judgments on how it can best be accessed. I would stress that it is very handy to learn advanced data structures in Perl,

Are some of the resources for you...

"Oh and yea does it make a difference in accessing the data from this text file if i use single quotes and double quotes? "
double quotes and single quotes contexts come into light if you are accessing variables, since interpolation is affected by the way a variable is enclosed, double quotes allow variable interpolation and single quotes do not..
$name = "varun monk"; print "$name\n"; print '$name\n';

Run this code, which does work similar to what you intend
use strict; use warnings; my $data={}; #declare an anonymous hash while(<DATA>){ chomp; my ($key, $val)=split /\s*=\s*/; $data->{$key}=$val; } print "name=>", $data->{name},"\n"; print "ip=>", $data->{ip},"\n"; ##View the data structure## use Data::Dumper; print Dumper($data); __DATA__ name = "varun" ip = "9.12.23.222";

Excellence is an Endeavor of Persistence. Chance Favors a Prepared Mind.