in reply to Intercharacter spacing
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Intercharacter spacing
by Tricky (Sexton) on Jul 23, 2003 at 16:57 UTC | |
Here's the text file: One day you're going to have to face A deep dark truthfull terror, And it's gonna tell you things that I still Love you too much to say. ####### Elvis Costello, Spike, 1988 #######And the expected response: 1:One day you're going to have to face 2: A deep dark truthfull terror, 3:And it's gonna tell you things that I still 4: Love you too much to say. 5:####### Elvis Costello, Spike, 1988 ####### Problem: 1. Why is this exception occurring? Perl seems to be looking for the text file at the same location every time: how do I change this? Why is Perl looking for the test.txt file at this location? Must be a default setting.I using DzSoft Perl Editor to write my dode, and running from by the DOS promted provided by the IDE. Very odd place for Windows to look for the files, as there”¦s no such file as ”„dir11.tmp”¦ when I look through the directory structure in Windows Explorer. Grrr. ¼ Windows seems to be looking for a temp file containing the perl source: what the hell is going on?! Solution: Locating the test.txt file in local settings? edited: Thu Jul 24 00:37:03 2003 by jeffa - code tags formatting | [reply] [d/l] [select] |
by graff (Chancellor) on Jul 24, 2003 at 04:41 UTC | |
then the error report would have something to do with the "open" statement and the file name string that you're giving it. If the perl interpreter (perl.exe) is in a directory that's covered by your PATH environment variable in a DOS shell, try stepping away from the DzSoft IDE for a bit, and use the shell. Go to the directory where your test perl script is kept, and do: If it gives a similar error report, try using forward slashes "/" instead of backslashes "\" in the file name that you pass to "open()". (I did say I was guessing...) Then make sure that the "test.txt" file really does exist in that exact path. Just out of curiosity, what do you get when you run this command in a DOS shell: For that matter, if you went to a directory that contains some longer file names (and names with spaces in them, etc), what would you get if you try this command: Do all the complete file names show up (long, with spaces,etc)? How about when you run that one-liner from within the IDE? One other point: don't even think about trying to do regex substitutions on HTML text data for the sake of "expanding" visible white-space. It'll give you a headache. Doing it without HTML::TokeParser would be utterly wrong. Doing it with HTML::TokeParser (and, say, adding in strategic spots) would just be misguided and unsatisfying (you'd see some results, but you'd rarely see results that look good). | [reply] [d/l] [select] |
by Tricky (Sexton) on Aug 07, 2003 at 13:48 UTC | |
| [reply] |
by Tricky (Sexton) on Aug 11, 2003 at 13:37 UTC | |
| [reply] [d/l] |
by graff (Chancellor) on Aug 12, 2003 at 01:31 UTC | |
by Tricky (Sexton) on Aug 16, 2003 at 15:31 UTC | |
| |
|
Re: Re: Intercharacter spacing
by Tricky (Sexton) on Jul 23, 2003 at 11:52 UTC | |
| [reply] |