Hi,
I am trying to open a file from a CGI thats used in a custom menu item. But nothing is displayed when I try to print the file content.
The code is as follows:
foreach(
@selectedhash) {
print "($_->{type}) $_->{path}<BR>\n";
$_->{path}=~ s/\/\.iwmnt//g;
open(CONTENTS,"$_->{path}") || print "Couldn't open the file $_->{path}\n";
print "the file name is : $_->{path}";
@lines=<CONTENTS>;
close(CONTENTS);
print "The contents are as follows:
@lines \n<BR>";
}
The output is as follows:
the file name is : /default/main/Production_branch/WORKAREA/Production_wa/ProductionWebApp/cms_content/wbr/headerinfo.html
The contents are as follows:
-------------
As you can see nothing is displayed after the line "The contents are as follows:".
Any ideas? I tried to open the same file from a perl script.. its working fine....
Thanks
Hemant