Re: Problem with llama book script

2001-07-04 Thread anton
Try this (hope'll work) $pathto='c:/perl/eg/grades.txt' open (GRADES,$pathto) or die It works in Unix for sure , and probably in W too If you use the file grade.txt for many times in your script and if you change it's location , you'll change your script just once in the "pathto" variable

Re: Problem with llama book script

2001-07-03 Thread Jos I. Boumans
you might want to avoid the complexity here and just say: open(GRADES, "grades.txt"); your problem are the \ marks... you'll need to use \\ in your example, seeing that \ is the escape character iirc, you can use / in perl paths too, even on a windows machine, but i'm not 100% on that one. try i

Re: Problem with llama book script

2001-07-03 Thread Francis Henry
i'm a newbie too, but try this- use slashes instead of backslashes, perl sees backslashes as escapes, so this: open(GRADES, "c:\perl\eg\grades.txt") or die "Can't open grades: $!\n"; should be: open(GRADES, "c:/perl/eg/grades.txt") or die "Can't open grades: $!\n"; lemme know if that helps! Cu

Problem with llama book script

2001-07-03 Thread Customer Service
O enlightened ones, here is my question: I am going through the llama book (which, by the way, is the most useful tool I have bought so far for perl reference) in order to learn perl. On page 10 is a simple script which I copied and have attempted to execute for the last 1/2 hour. Please tell m