Perl Programming/Keywords/use

From Wikibooks, open books for an open world
Jump to navigation Jump to search
Previous: until Keywords Next: utime

The use keyword[edit | edit source]

use imports some semantics into the current package from the named module, generally by aliasing certain subroutine or variable names into the calling package. It is exactly the same as

BEGIN { require Module; Module->import( LIST ); }

with the exception that Module must be a bareword.

Syntax[edit | edit source]

  use Module VERSION LIST
  use Module VERSION
  use Module LIST
  use Module
  use VERSION

See also[edit | edit source]

Previous: until Keywords Next: utime