Wow, that makes things easier, doesn't it? Thanks. Still, I'd like to figure out why it is that 1's keep getting added ... anyway, once I get more time I'll post the code here. Right now, all I can provide is a sort of paraphrase ...
#!/usr/bin/perl
#then some code, then ...
$file =...
Yeah, I just print $data after that. ... I probably should put a die statement after that open(), though. :)
Oh, and I put the file data into a variable because I do a lot of parsing and whatnot with the data, then send back the finished result.
... Part of a script I wrote involves reading a file into an array then putting that array into one character string. Since I wasn't sure whether there was a shortcut to do that (just read a file into a scalar, no array), here's what I did:
open(f, "$filename"); @file = <f>; close(f)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.