Errin Larsen wrote:
> Hi Perlers,
> 
> I've seen a lot of tutorial or example code dealing with the POSIX
> module that does something like this:
> 
>   use POSIX ':sys_wait_h';
> 
> What does the ':' mean/do in the above line?

It's called a "tag" and is typically used to import a "basket" of symbols.

See "perldoc Exporter", under the heading "Specialised Import Lists"

For some reason this isn't documented in my copy of POSIX. But you can see
the symbols exported by running:

  $ perl -MPOSIX -le 'print for @{$POSIX::EXPORT_TAGS{sys_wait_h}}'
  WEXITSTATUS
  WIFEXITED
  WIFSIGNALED
  WIFSTOPPED
  WNOHANG
  WSTOPSIG
  WTERMSIG
  WUNTRACED

(your system may show different values)

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to