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
How probably not to hand over a variable from one perl script to another
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Markus Hänchen, post: 4823351"] it probably wasn't a good perl book if you learned all those poor perl I've mentioned it several times in this thread, my book is "Learning Perl" by Phoenix and Schwartz. One of the better solutions to my problem (splitting code into more than one file), as it has been recommended here a number of times, is the use of modules. In this book modules are only mentioned as something prefabricated that one can use. How to create them and in what situations to create them is not mentioned in the book. (I don't want to say modules are not important, I just want to say that you can have read a decent book about Perl and don't know about the importance of modules. And I know about it know, thanks to a lot of helpful people in this thread.) That is exactly the kind of language that I appreciate in these kinds of newsgroops and what keeps me coming back here... 'Calling an array' was figuratively speaking for using the name of an array in some manner in one's code to access some kind of information out of it or from it. Using the code '$variable = @array' and not '$variable = $array[0]' to access the first variable of an array was an unneccessary mistake (unneccessary in the sense that if I had been asked explicitly which of the versions is the correct one I would have picked the correct one). I do dozens of such mistakes every day, but in the end I find them all (or find another way to code it), otherwise my code would not work and produce correct results. I was just trying to explain what my logic must have been that led me to do such a mistake (I already knew a method to get the number of entries in an array, $#array+1, thereby my ignorance of the fact that '$variable = @array' gives you the number of elements was rather an ignorance of the sort, 'I did not the other method to this'. Secondly, Perl is such a wonderful language, in that almost always does something whatever you code, not always what you want or expect, admittedly, compared to other languages where compilation often fails when you try to mix e.g. scalars and arrays. So, I sometimes guess what the correct solution is and see what Perl makes out of it (Yes, I know, one might call this the 'throw at the wall' technique), but I either go back to my book and look up the correct notation or just run Perl. Both takes time, debugging code or consulting a book.) [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
How probably not to hand over a variable from one perl script to another
Top