[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Escaping quotes WIN32/UNIX



Hi

Jeg prøver at få mit UNIX perl program til at køre under windows og forsøger
i den forbindelse at kalde et externt progam fra perl på denne

måde:

execute ("program.exe -a='<?xml version="1.0"
encoding="ISO-8859-1"?><DOCTYPE rpc:methodCall
STEM"../config/PRpc.dtd"><rpc:methodCall>...</rpc:methodCall>' 2>&1 ");

sub execute {

my ($cmd) = @_;

open (FILE, $cmd) or die "Can't start $cmd $!\n";;

while (<FILE>) {

print $_;

}

}

Dette går fint under Solaris men på WIN32 (ActiveState) får jeg fejlen: <
var ikke ventet på dette tidspunkt.

Jeg har prøvet at escape -a argumentet på forskellig måde men uden held. det
er sandsynligvis commandprompten under win2000 der får galt fat i de
indlejrede ". Er der nogen der har en ide til dette?

Derudover skal programmer tage argumenter fra kommandolinien der expanderer
til filnavne med følgende syntax

foreach my $file (@ARGV) {}

det går igen fint på unix men ikke win32 jeg gætter på at der igen er
shellen der expanderer under unix, men ikke win32, hvordan skal dette omgås
på en portabel måde?

Hilsen

Henrik







 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 19:54 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *