Hi Kryten, On Friday 15 October 2010 08:42:07 Kryten wrote: > Hi, > I'm hitting a strange problem running simple perlscript on my new > laptop. > > To illustrate:- > > #!/usr/bin/perl > use strict; > use warnings; > use diagnostics; > > open my $configuration, 'H:\temp.txt' or die "my error: $!" ;
You may consider replacing "\" with "/" - it works just as well inside Perl on Windows , and causes less troubles. > my @info = <$configuration> ; > chomp (@info); > foreach my $i (@info) { print "$i\n " ; } > ## End > > When I run in either Primalscript or Hippoedit the output pane emits > the 1st character > of the 1st line in the "H:\temp.txt" file, preceded by a colon. Primalscript and Hippoedit appear to be non-open-source IDEs. Please try running the script from the command line (see http://sourceforge.net/projects/console/ ) and report the results. > > I realise this is the case because if I change the 1st line character > to whatever, the > re-run the code that's the character I get. It doesn't matter where > the file is located. > I have admin rights on the machine etc > > W7 x64 with Activeperl 5.12.2 > Did you also try http://strawberryperl.com/ ? It's an open-source distribution of Perl for Windows. Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ The Case for File Swapping - http://shlom.in/file-swap <rindolf> She's a hot chick. But she smokes. <go|dfish> She can smoke as long as she's smokin'. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/