Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
specifying use strict
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Uri Guttman, post: 4780068"] g> Thanks all for the reply. g> Uri, g> I thought that when I opened the file with my hash in it using g> eval <'my file handle here'> i would read it into a scalar and eval it. that way you can print out what you read for debugging. but as i said you are doing work you don't have to do. search cpan for config modules. and if you must roll your own, isolate it into a sub so you can debug it. do it step by step. open the file (and handle failures), slurp it in. eval it. return the structure. g> Other responses........ g> No I dont know what the '()' does after the g> subroutine name g> guess I should research it. yep. g> I would look at File::Slurp why is it better and g> cleaner? because it is faster, cleaner, safer. that is why i wrote it. g> I dont know what a newsreader is ( dont think I used g> one ) then how did you post here? your header say you are using google groups which is your newsreader (web based). g> I use our because some of those scalars I need to be g> global to g> the package not to the subroutines. that makes little sense. first, you should be passing those values as args instead of package globals. second, if they must be outside subs, they should be my which will make the file scoped and not global. g> The code I posted here is just to test it out, it ( g> the two subs ) will g> be used in another script where I want to be able to g> know what g> certain variables are at anytime during the program. g> I changed them from my to our to make sure I could g> see them. my allows that but it is bad style to use more globalness than you need. g> As obvious I am a novice Perl user but outside my g> power I had g> to teach myself Perl under time constraints. g> Need to find a good Perl book for after hours and g> learn more g> details instead of winging it. learn.perl.org is your friend. there is a free decent book on that site. you can't code stuff like this without knowing some basics. otherwise you are just cutting and pasting and guessing. uri [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
specifying use strict
Top