typeglob

What does *PIPER mean in Perl?

Hello, I need some help understanding the following Perl code snippet. I have the following two questions. 1. What does local *PIPER mean? Even though I've done some Perl programming before the local * syntax is new to me. Is it a pointer? 2. What is the purpose of curl http://www.somesite.net/cgi-bin/updateuser.cgi? -d "userid=$use...

How do I rename an exported function in Perl?

I have some Perl modules which exports various functions. (We haven't used @EXPORT in new modules for some years, but have retained it for compatibility with old scripts.) I have renamed a number of functions and methods to change to a consistent naming policy, and thought that then adding a list of lines like *directory_error = ...

How can a Perl subroutine distinguish between file names, file handes, *DATA, and *STDIN?

If I have a function that might be passed a file name or various file handles or typeglobs, how can the function distinguish among these arguments -- including telling the difference, for example, between *DATA and *STDIN? Updated code, based on answers received so far Thanks, everyone. use strict; use warnings; use FileHandle; sub fi...

Reading another packages symbol table in Perl

I am trying to read a global symbol from another package. I have the package name as a string. I am using qualify_to_ref from Symbol module my $ref = qualify_to_ref ( 'myarray', 'Mypackage' ) ; my @array = @$ref ; gives me Not an ARRAY reference at ...... I presume I am getting the format of the dereference wrong. Here is ...

perl: iterate over a typeglob

Given a typeglob, how can I find which types are actually defined? In my application, we user PERL as a simple configuration format. I'd like to require() the user config file, then be able to see which variables are defined, as well as what types they are. Code: (questionable quality advisory) #!/usr/bin/env perl use strict; use war...