Re: Vista Datei einlesen



mehr Info:


Der Editor ist Vista Kompatibel (DZSOFT)

Umgebungsvariable Path:
C:\Perl\site\bin;C:\Perl\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program
Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Common
Files\Adobe\AGL;C:\Program Files\QuickTime\QTSystem\;C:\Program
Files\Java\jdk1.6.0_07\bin

Fehlermeldung kommt keine, im Editor steht nur:

Warning: Content-Type header not found in the script output. If this script
is not a CGI one, please use the Run -> Run in Command Prompt menu to run
it.


Zugriffsrechte:
Wo soll ich diese in Vista setzen?
Auf C:\Perl haben alle Vollzugriff. Reicht das?

Was ich nicht verstehe ist, das es auf der Cpmmandline funktioniert


Das Script:


#!C:\perl\bin\perl -w

use strict;
use locale;

my $file="PLZ.txt"; # Pfad zur Eingabedatei
my %plz; # Hash das die PLZ aufnimmt
my @plz_liste;
my @felder; # temporäre Liste
my ($plz_feld,$ort);
# file zum lesen öffnen
# open (FILEHANDLE,Pfad zu File);
open (IN,"< $file");
while (<IN>){
# Variante 1
# @felder = (split(/;/,$_))[1,2];
# $plz{$felder[0]}=$felder[1];
#
# Variante 2
# ($plz_feld,$ort) = (split(/;/,$_))[1,2];
# $plz{$plz_feld}=$ort;
#
# Variante 3
$plz{(split(/;/,$_))[1]}=(split(/;/,$_))[2];
}

# das Dateihandle wieder schliessen mit close()
close IN;
map {print "$_ ist die PLZ von $plz{$_}\n";}
sort keys %plz;


Besten Dank im Voraus

Edi

"Edi Aal" <edi.aal@xxxxxx> schrieb im Newsbeitrag news:4915a8f4$0$3142$91cee783@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hallo

Seit ich Vista Installiert habe funktioniern im Editor (habe 3 Verschiedene probiert) einige Scripts nicht mehr.
Und zwar jene wo ich Dateien einlesen will.
Auf der Command line funktionieren sie.

Bitte um Hilfe

Besten Dank im Voraus



.



Relevant Pages

  • Re: Dateieinlesen in Vista geht nicht
    ... Fehlermeldung kommt keine, im Editor steht nur: ... If this script is not a CGI one, please use the Run -> Run in Command Prompt menu to run it. ... Wo soll ich diese in Vista setzen? ...
    (de.comp.lang.perl.cgi)
  • Re: Vista Logon Script
    ... I cannot possibly deploy Vista until this is fixed either. ... are some scripts like 'Map network drives' that would need to be run in UAP ... In order to launch such scripts in a UAP context from an elevated ... Here is a sample script: ...
    (microsoft.public.scripting.wsh)
  • Re: Writing my 1st VBS "Script Component"
    ... source object is vacated; I always vacate the drived object first. ... In script, though, MS has tried to make it very ... And it's 3.3 product cycles for their Software Assurance racket. ... but it's supported in Vista. ...
    (microsoft.public.scripting.vbscript)
  • Re: Trailing blanks in batch file
    ... Same applies to parentheses and quotes, ... problem as there *being* a trailing space whose presence creates a problem. ... If someone exclusively used an editor that displayed blanks as grey dots, ... can never be sure that one's script will never be edited by someone else ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: Writing and debugging VBS
    ... rem that out temporarily then re-run your script and see what ... > Editor in Excel or Word, in the hope that the editor would step through ... > screen changed for a few seconds, before reverting to the design mode. ... > (in a similar way to the VBA editor) to step through my VBS code? ...
    (microsoft.public.scripting.vbscript)

Loading