in reply to Re^2: Extract attributes/values from XML using perl
in thread Extract attributes/values from XML using perl / declaring wires in verilog using perl

Agree with choroba's post that you don't need the feature 'say' to solve your issue. But FYI, in Perl you can create your own global functions with the core module Exporter. A very naive implementation:

In MyFeatures.pm:

package MyFeatures; use strict; use warnings; use Exporter qw/ import /; our @EXPORT_OK = qw/ say /; sub say { my $str = shift; print "$str\n"; } 1; # return true

In your program:

#!/usr/bin/perl use strict; use warnings; use MyFeatures qw/ say /; my $str = 'Hello, world.'; say $str; say q{Nice weather, isn't it?}; __END__

Output:

Hello, world. Nice weather, isn't it?

Hope this helps.

The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^4: Extract attributes/values from XML using perl
by gr.d (Novice) on Jan 08, 2016 at 08:39 UTC

    That's useful, Thank you