Schrift
Wiki:Tipp zum Debugging: use Data::Dumper; local $Data::Dumper::Useqq = 1; print Dumper \@var;
[thread]6284[/thread]

Variable an shell übergeben



<< >> 3 Einträge, 1 Seite
Gast Gast
 2004-05-23 02:38
#82651 #82651
hallo

ich habe folgendes problem.

use Shell qw (echo);
....
foreach $xfsfile (@xfsfiles)
{

@readfilename = echo ("read $xfsfiles" )
}
....
die variable $xfsfiles wird in der echo anweisung nicht ausgewertet. woran liegt das?

danke

kai
jan
 2004-05-23 03:08
#82652 #82652
User since
2003-08-04
2536 Artikel
ModeratorIn
[Homepage] [default_avatar]
a) du hast kein use strict; drin. das ist zwar nicht ursache, aber teil des fehlers.
b) $xfsfiles gibt es nicht, nur $xfsfile und @xfsfiles.
c) strict hätte sich beschwert und damit wäre der fehler hinfällig. ;)\n\n

<!--EDIT|jan|1085267351-->
steinwolf
 2004-05-23 18:44
#82653 #82653
User since
2003-08-04
367 Artikel
BenutzerIn
[default_avatar]
Code: (dl )
1
2
3
4
5
6
7
use strict;
use Shell qw (echo);

foreach (@xfsfiles)
{
@readfilename = echo ("read $_" )
}
\n\n

<!--EDIT|steinwolf|1085323577-->
"Did you know? You can use your old motor oil to fertilize your lawn." - Blinkster - Professionelles EDV Forum
<< >> 3 Einträge, 1 Seite



View all threads created 2004-05-23 02:38.