- or download this
Global symbol "$node_c" requires explicit package name (did you forget
+ to declare "my $node_c"?) at derp.pl line 13.
Execution of derp.pl aborted due to compilation errors.
- or download this
use strict;
use warnings;
...
my($object0) = $doc->findnodes("/header/id/c/text()");
$object0->setData( $node_c );
print $doc;
- or download this
Please specify node c content
...
<c>derp</c>
</id>
</header>
- or download this
#!/usr/bin/perl
use strict;
...
chomp( my $node_c = <STDIN> );
$dom->at('id > c')->content( $node_c );
say $dom->content;
- or download this
Current value of c: NA
Please specify node c content:
...
<c>derp</c>
</id>
</header>