CINXE.COM

Scalar::Util - A selection of general-utility scalar subroutines - metacpan.org

<!DOCTYPE html> <html lang="en-US"> <head> <title>Scalar::Util - A selection of general-utility scalar subroutines - metacpan.org</title> <link rel="preload" as="fetch" href="/account/login_status" crossorigin="anonymous" /> <link href="/assets/style-XFEQ536G.css" rel="stylesheet" type="text/css"> <script src="/assets/main-WXBSEDQJ.js" type="module"></script> <link rel="alternate" type="application/rss+xml" title="Recent CPAN Uploads of Scalar-List-Utils - MetaCPAN" href="/dist/Scalar-List-Utils/releases.rss" /> <link rel="canonical" href="https://metacpan.org/pod/Scalar::Util" /> <meta name="description" content="A selection of general-utility scalar subroutines" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5"> <link rel="shortcut icon" href="/static/icons/favicon.ico"> <link rel="apple-touch-icon" sizes="152x152" href="/static/icons/apple-touch-icon.png"> <link rel="search" href="/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN"> <script async src="https://perl-ads.perlhacks.com/perl-ads.js"></script> <script async src="https://www.googletagmanager.com/gtag/js?id=G-E82Q2V8LVD"></script> <meta property="og:site_name" content="MetaCPAN" /> <meta name="twitter:site" content="@metacpan" /> <meta property="og:type" content="article" /> <meta name="twitter:card" content="summary" /> <meta property="og:url" content="https://metacpan.org/pod/Scalar::Util" /> <meta property="og:title" content="Scalar::Util" /> <meta property="og:description" content="A selection of general-utility scalar subroutines" /> <meta property="og:image" content="https://metacpan.org/static/images/dots.png" /> </head> <body> <nav class="navbar navbar-default" role="navigation"> <div class="header-logo-large hidden-xs"> <a href="/" tabindex="0"> <svg class="logo" aria-label="MetaCPAN"> <use class="logo" href="/static/images/metacpan-logo.svg#logo" /> </svg> </a> </div> <div class="header-logo-icon visible-xs"> <a href="/"> <svg class="logo" aria-label="MetaCPAN"> <use class="logo" href="/static/images/metacpan-logo.svg#dots" /> </svg> </a> </div> <ul class="nav navbar-nav menu-items hidden-xs hidden-sm"> <li><a href="/about">About</a></li> <li><a href="/about/sponsors">Sponsor</a></li> <li><a href="https://grep.metacpan.org/">grep::cpan</a></li> <li><a href="/recent">Recent</a></li> <li><a href="/about/faq">FAQ</a></li> <li><a href="/tools">Tools</a></li> <li><a href="https://fastapi.metacpan.org/">API</a></li> </ul> <ul class="nav navbar-nav navbar-right"> <button type="button" class="searchbar-btn visible-xs visible-sm"> <i class="fa fa-search button-fa-icon"></i> </button> <form action="/search" class="searchbar-form visible-md visible-lg search-form form-horizontal"> <input type="hidden" name="size" id="metacpan_search-size" value="20"> <div class="form-group"> <div class="search-group"> <i class="fa fa-search"></i> <input type="text" name="q" placeholder="Search the CPAN" size="41" autocorrect="off" autocapitalize="off" spellcheck="false" id="metacpan_search-input" class="form-control" value=""> </div> </div> </form> <li class="icon-slidepanel visible-xs visible-sm"> <button data-toggle="slidepanel" data-target=".slidepanel"> <span class="button-fa-icon"> <i class="fa fa-bars slidepanel-open"></i> <i class="fa fa-times slidepanel-close"></i> </span> </button> </li> <li class="dropdown login-dropdown show-logged-in"> <button type="button" class="dropdown-toggle" data-toggle="dropdown"> <i class="fa fa-user button-fa-icon logged-in-icon" aria-hidden="true"></i> <i class="fas fa-chevron-down"></i> </button> <ul class="dropdown-menu"> <li><a href="/account/identities">Identities</a></li> <li><a href="/account/profile">Profile</a></li> <li><a href="/account/favorite/list">Favorites</a></li> <li> <a href="#" type="button" class="logout-button"> Logout </a> </li> </ul> </li> <li class="dropdown login-dropdown show-logged-out"> <button type="button" class="dropdown-toggle" data-toggle="dropdown"> <i class="fa fa-user button-fa-icon avatar-placeholder" aria-hidden="true"></i> <i class="fas fa-chevron-down"></i> </button> <ul class="dropdown-menu"> <li> <a href="/login/github"> <i class="fab fa-github fa-fw"></i> GitHub </a> </li> <li> <a href="/login/twitter"> <i class="fab fa-twitter fa-fw"></i> Twitter </a> </li> <li> <a href="/login/google"> <i class="fab fa-google fa-fw"></i> Google </a> </li> </ul> </li> <li class="dropdown login-dropdown hide-logged-in hide-logged-out"> <button> <i class="fa fa-user button-fa-icon" aria-hidden="true"></i> </button> </li> </ul> </nav> <div class="page-content "> <div id="perl-ad-target" class="top-notify-banner perl-ad-target"> </div> <nav class="sidebar"> <div class="slidepanel"> <ul class="nav-list "> <li class="nav-header no-margin-top"> <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of Scalar-List-Utils was released."> <span class="relatize">18 Oct 2024 11:30:40 UTC</span> </div> </li> <li> Distribution: <a href="/dist/Scalar-List-Utils">Scalar-List-Utils</a> </li> <li> Module version: 1.68 </li> <li> <a data-keyboard-shortcut="g s" href="/dist/Scalar-List-Utils/source/lib/Scalar/Util.pm">Source</a> (<a href="/dist/Scalar-List-Utils/source/lib/Scalar/Util.pm?raw=1">raw</a>) </li> <li> <a data-keyboard-shortcut="g b" href="/dist/Scalar-List-Utils/source/lib/Scalar">Browse</a> (<a href="/dist/Scalar-List-Utils/source/lib/Scalar?raw=1">raw</a>) </li> <li> <a data-keyboard-shortcut="g c" href="/dist/Scalar-List-Utils/changes">Changes</a> </li> <li> <a class="nopopup" href="/dist/Scalar-List-Utils/contribute">How to Contribute</a> </li> <li> <a rel="noopener nofollow" data-keyboard-shortcut="g r" href="https://github.com/Dual-Life/Scalar-List-Utils">Repository</a> </li> <li> <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://rt.cpan.org/Public/Dist/Display.html?Name=Scalar-List-Utils">Issues</a> (98) </li> <li> <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=Scalar-List-Utils+1.68" title="Matrix">Testers</a> </li> <li> <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/PEVANS/Scalar-List-Utils-1.68">Kwalitee</a> </li> <li> <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on Scalar-List-Utils who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)"> Bus factor: 5 </div> </li> <li> License: perl_5 </li> <li> Perl: v5.6.0 </li> <li class="nav-header">Activity</li> <li> <div class="activity-graph"> <img src="/dist/Scalar-List-Utils/activity.svg?res=month" /> <div class="comment">24 month</div> </div> </li> <li class="nav-header">Tools</li> <li> <a itemprop="downloadUrl" href="https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Scalar-List-Utils-1.68.tar.gz"> Download (<span itemprop="fileSize">177.28KB</span>)</a> </li> <li> <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FPEVANS%2FScalar-List-Utils-1.68%2Flib%2FScalar%2FUtil.pm"> MetaCPAN Explorer </a> </li> <li> <a href="/dist/Scalar-List-Utils/permissions"> Permissions </a> </li> <li> <a href="/dist/Scalar-List-Utils/releases.rss"> Subscribe to distribution </a> </li> <li> <button class="btn btn-link" data-toggle="modal" data-target="#metacpan_install-instructions-dialog"> Install Instructions </button> </li> <li> <form action="/search"> <input type="hidden" name="q" value="dist:Scalar-List-Utils"> <input type="search" name="q" placeholder="Search distribution" class="form-control tool-bar-form"> <input type="submit" style="display: none"> </form> </li> <li> <form action="https://grep.metacpan.org/search"> <input type="hidden" name="qd" value="Scalar-List-Utils"> <input type="hidden" name="source" value="metacpan"> <input type="search" name="q" placeholder="grep distribution" class="form-control tool-bar-form"> <input type="submit" style="display: none"> </form> </li> <li class="version-jump"> <select class="select-navigator form-control tool-bar-form"> <option disabled selected>Jump to version</option> <option disabled value="/release/PEVANS/Scalar-List-Utils-1.68/view/lib/Scalar/Util.pm" >1.68 (PEVANS on 2024-10-18)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.66/view/lib/Scalar/Util.pm" >1.66 (PEVANS on 2024-09-19)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.65/view/lib/Scalar/Util.pm" >1.65 (PEVANS on 2024-08-06)</option> <option value="/release/RURBAN/Scalar-List-Utils-1.50_11/view/lib/Scalar/Util.pm" >1.50_11 DEV (RURBAN on 2018-09-05)</option> <option value="/release/RURBAN/Scalar-List-Utils-1.50_10/view/lib/Scalar/Util.pm" >1.50_10 DEV (RURBAN on 2018-09-04)</option> <option value="/release/RURBAN/Scalar-List-Utils-1.49_10/view/lib/Scalar/Util.pm" >1.49_10 DEV (RURBAN on 2017-12-18)</option> <option value="/release/RURBAN/Scalar-List-Utils-1.49_09/view/lib/Scalar/Util.pm" >1.49_09 DEV (RURBAN on 2017-12-05)</option> <option value="/release/RURBAN/Scalar-List-Utils-1.49_08/view/lib/Scalar/Util.pm" >1.49_08 DEV (RURBAN on 2017-12-05)</option> <option value="/release/RURBAN/Scalar-List-Utils-1.46_08/view/lib/Scalar/Util.pm" >1.46_08 DEV (RURBAN on 2016-12-11)</option> <option value="/release/RURBAN/Scalar-List-Utils-1.45_05/view/lib/Scalar/Util.pm" >1.45_05 DEV (RURBAN on 2016-09-13)</option> <option value="/release/RURBAN/Scalar-List-Utils-1.45_03/view/lib/Scalar/Util.pm" >1.45_03 DEV (RURBAN on 2016-06-02)</option> <option value="/release/RURBAN/Scalar-List-Utils-1.45_02/view/lib/Scalar/Util.pm" >1.45_02 DEV (RURBAN on 2016-05-28)</option> <optgroup label="BackPAN">' <option value="/release/PEVANS/Scalar-List-Utils-1.67/view/lib/Scalar/Util.pm" >1.67 (PEVANS on 2024-10-18)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.64/view/lib/Scalar/Util.pm" >1.64 (PEVANS on 2024-08-02)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.63/view/lib/Scalar/Util.pm" >1.63 (PEVANS on 2022-08-08)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.62/view/lib/Scalar/Util.pm" >1.62 (PEVANS on 2022-03-17)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.61/view/lib/Scalar/Util.pm" >1.61 (PEVANS on 2022-02-16)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.60/view/lib/Scalar/Util.pm" >1.60 (PEVANS on 2021-10-08)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.59/view/lib/Scalar/Util.pm" >1.59 (PEVANS on 2021-09-12)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.58/view/lib/Scalar/Util.pm" >1.58 (PEVANS on 2021-09-12)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.57/view/lib/Scalar/Util.pm" >1.57 (PEVANS on 2021-09-11)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.56/view/lib/Scalar/Util.pm" >1.56 (PEVANS on 2021-03-30)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.55/view/lib/Scalar/Util.pm" >1.55 (PEVANS on 2020-04-12)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.55-TRIAL/view/lib/Scalar/Util.pm" >1.55-TRIAL DEV (PEVANS on 2020-04-09)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.54/view/lib/Scalar/Util.pm" >1.54 (PEVANS on 2020-02-02)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.53/view/lib/Scalar/Util.pm" >1.53 (PEVANS on 2019-10-24)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.52_001/view/lib/Scalar/Util.pm" >1.52_001 DEV (PEVANS on 2019-10-23)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.52/view/lib/Scalar/Util.pm" >1.52 (PEVANS on 2019-08-17)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.51/view/lib/Scalar/Util.pm" >1.51 (PEVANS on 2019-08-08)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.50/view/lib/Scalar/Util.pm" >1.50 (PEVANS on 2018-02-20)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.49/view/lib/Scalar/Util.pm" >1.49 (PEVANS on 2017-09-08)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.48/view/lib/Scalar/Util.pm" >1.48 (PEVANS on 2017-06-23)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.47/view/lib/Scalar/Util.pm" >1.47 (PEVANS on 2016-12-22)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.46/view/lib/Scalar/Util.pm" >1.46 (PEVANS on 2016-09-29)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.45/view/lib/Scalar/Util.pm" >1.45 (PEVANS on 2016-03-25)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.44_002/view/lib/Scalar/Util.pm" >1.44_002 DEV (PEVANS on 2016-03-23)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.44_001/view/lib/Scalar/Util.pm" >1.44_001 DEV (PEVANS on 2016-03-19)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.44/view/lib/Scalar/Util.pm" >1.44 (PEVANS on 2016-03-17)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.43_005/view/lib/Scalar/Util.pm" >1.43_005 DEV (PEVANS on 2016-03-17)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.43_004/view/lib/Scalar/Util.pm" >1.43_004 DEV (PEVANS on 2016-03-17)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.43_003/view/lib/Scalar/Util.pm" >1.43_003 DEV (PEVANS on 2016-03-17)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.43_002/view/lib/Scalar/Util.pm" >1.43_002 DEV (PEVANS on 2016-03-16)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.43_001/view/lib/Scalar/Util.pm" >1.43_001 DEV (PEVANS on 2016-03-16)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.43/view/lib/Scalar/Util.pm" >1.43 (PEVANS on 2016-02-08)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.42_002/view/lib/Scalar/Util.pm" >1.42_002 DEV (PEVANS on 2016-02-04)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.42_001/view/lib/Scalar/Util.pm" >1.42_001 DEV (PEVANS on 2016-02-03)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.42/view/lib/Scalar/Util.pm" >1.42 (PEVANS on 2015-04-23)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.41/view/lib/Scalar/Util.pm" >1.41 (PEVANS on 2014-09-05)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.40/view/lib/Scalar/Util.pm" >1.40 (PEVANS on 2014-08-30)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.39_004/view/lib/Scalar/Util.pm" >1.39_004 DEV (PEVANS on 2014-08-27)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.39_003/view/lib/Scalar/Util.pm" >1.39_003 DEV (PEVANS on 2014-08-26)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.39_002/view/lib/Scalar/Util.pm" >1.39_002 DEV (PEVANS on 2014-08-26)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.39_001/view/lib/Scalar/Util.pm" >1.39_001 DEV (PEVANS on 2014-08-25)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.39/view/lib/Scalar/Util.pm" >1.39 (PEVANS on 2014-06-05)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.38/view/lib/Scalar/Util.pm" >1.38 (PEVANS on 2014-01-22)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.37/view/lib/Scalar/Util.pm" >1.37 (PEVANS on 2014-01-21)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.36/view/lib/Scalar/Util.pm" >1.36 (PEVANS on 2014-01-16)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.35/view/lib/Scalar/Util.pm" >1.35 (PEVANS on 2013-10-19)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.34/view/lib/Scalar/Util.pm" >1.34 (PEVANS on 2013-10-16)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.33/view/lib/Scalar/Util.pm" >1.33 (PEVANS on 2013-10-13)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.32/view/lib/Scalar/Util.pm" >1.32 (PEVANS on 2013-08-31)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.31/view/lib/Scalar/Util.pm" >1.31 (PEVANS on 2013-08-14)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.30/view/lib/Scalar/Util.pm" >1.30 (PEVANS on 2013-08-05)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.29_001/view/lib/Scalar/Util.pm" >1.29_001 DEV (PEVANS on 2013-08-04)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.29/view/lib/Scalar/Util.pm" >1.29 (PEVANS on 2013-08-01)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.28/view/lib/Scalar/Util.pm" >1.28 (PEVANS on 2013-08-01)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.27_002/view/lib/Scalar/Util.pm" >1.27_002 DEV (PEVANS on 2013-07-29)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.27_001/view/lib/Scalar/Util.pm" >1.27_001 DEV (PEVANS on 2013-07-29)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.27/view/lib/Scalar/Util.pm" >1.27 (PEVANS on 2012-12-27)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.26_001/view/lib/Scalar/Util.pm" >1.26_001 DEV (PEVANS on 2012-12-23)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.26/view/lib/Scalar/Util.pm" >1.26 (PEVANS on 2012-12-16)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.25/view/lib/Scalar/Util.pm" >1.25 (PEVANS on 2012-03-24)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.24/view/lib/Scalar/Util.pm" >1.24 (PEVANS on 2012-03-22)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.23_04/view/lib/Scalar/Util.pm" >1.23_04 DEV (PEVANS on 2012-03-10)</option> <option value="/release/GBARR/Scalar-List-Utils-1.23_03/view/lib/Scalar/Util.pm" >1.23_03 DEV (GBARR on 2010-09-14)</option> <option value="/release/GBARR/Scalar-List-Utils-1.23_02/view/lib/Scalar/Util.pm" >1.23_02 DEV (GBARR on 2010-03-30)</option> <option value="/release/GBARR/Scalar-List-Utils-1.23_01/view/lib/Scalar/Util.pm" >1.23_01 DEV (GBARR on 2010-03-22)</option> <option value="/release/GBARR/Scalar-List-Utils-1.23/view/lib/Scalar/Util.pm" >1.23 (GBARR on 2010-03-11)</option> <option value="/release/GBARR/Scalar-List-Utils-1.22/view/lib/Scalar/Util.pm" >1.22 (GBARR on 2009-11-14)</option> <option value="/release/GBARR/Scalar-List-Utils-1.21/view/lib/Scalar/Util.pm" >1.21 (GBARR on 2009-05-18)</option> <option value="/release/GBARR/Scalar-List-Utils-1.20/view/lib/Scalar/Util.pm" >1.20 (GBARR on 2009-05-13)</option> <option value="/release/GBARR/Scalar-List-Utils-1.19/view/lib/Scalar/Util.pm" >1.19 (GBARR on 2006-12-10)</option> <option value="/release/GBARR/Scalar-List-Utils-1.18/view/lib/Scalar/Util.pm" >1.18 (GBARR on 2005-11-25)</option> <option value="/release/GBARR/Scalar-List-Utils-1.17/view/lib/Scalar/Util.pm" >1.17 (GBARR on 2005-05-23)</option> <option value="/release/GBARR/Scalar-List-Utils-1.16/view/lib/Scalar/Util.pm" >1.16 (GBARR on 2005-05-20)</option> <option value="/release/GBARR/Scalar-List-Utils-1.14/view/lib/Scalar/Util.pm" >1.14 (GBARR on 2004-05-22)</option> <option value="/release/GBARR/Scalar-List-Utils-1.13/view/lib/Scalar/Util.pm" >1.13 (GBARR on 2003-09-25)</option> <option value="/release/GBARR/Scalar-List-Utils-1.12/view/lib/Scalar/Util.pm" >1.12 (GBARR on 2003-08-14)</option> <option value="/release/GBARR/Scalar-List-Utils-1.11/view/lib/Scalar/Util.pm" >1.11 (GBARR on 2003-02-14)</option> <option value="/release/GBARR/Scalar-List-Utils-1.10/view/lib/Scalar/Util.pm" >1.10 (GBARR on 2003-02-04)</option> <option value="/release/GBARR/Scalar-List-Utils-1.09/view/lib/Scalar/Util.pm" >1.09 (GBARR on 2002-12-12)</option> <option value="/release/GBARR/Scalar-List-Utils-1.08/view/lib/Scalar/Util.pm" >1.08 (GBARR on 2002-11-03)</option> <option value="/release/GBARR/Scalar-List-Utils-1.0701/view/lib/Scalar/Util.pm" >1.0701 (GBARR on 2002-04-29)</option> <option value="/release/GBARR/Scalar-List-Utils-1.07/view/lib/Scalar/Util.pm" >1.07 (GBARR on 2002-03-18)</option> <option value="/release/GBARR/Scalar-List-Utils-1.06/view/lib/Scalar/Util.pm" >1.06 (GBARR on 2001-09-18)</option> <option value="/release/GBARR/Scalar-List-Utils-1.05/view/lib/Scalar/Util.pm" >1.05 (GBARR on 2001-09-05)</option> <option value="/release/GBARR/Scalar-List-Utils-1.04/view/lib/Scalar/Util.pm" >1.04 (GBARR on 2001-09-05)</option> <option value="/release/GBARR/Scalar-List-Utils-1.03/view/lib/Scalar/Util.pm" >1.03 (GBARR on 2001-09-03)</option> <option value="/release/GBARR/Scalar-List-Utils-1.02/view/lib/Scalar/Util.pm" >1.02 (GBARR on 2000-04-10)</option> <option value="/release/GBARR/Scalar-List-Utils-1.01/view/lib/Scalar/Util.pm" >1.01 (GBARR on 2000-03-03)</option> <option value="/release/GBARR/Scalar-List-Utils-1.00/view/lib/Scalar/Util.pm" >1.00 (GBARR on 1999-07-16)</option> <option value="/release/GBARR/Scalar-List-Utils-0.10/view/lib/Scalar/Util.pm" >0.10 (GBARR on 1999-06-01)</option> </optgroup> </select> </li> <li class="version-diff"> <select class="select-navigator form-control tool-bar-form"> <option disabled selected>Diff with version</option> <option disabled value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.68/lib/Scalar/Util.pm" >1.68 (PEVANS on 2024-10-18)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.66/lib/Scalar/Util.pm" >1.66 (PEVANS on 2024-09-19)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.65/lib/Scalar/Util.pm" >1.65 (PEVANS on 2024-08-06)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/RURBAN/Scalar-List-Utils-1.50_11/lib/Scalar/Util.pm" >1.50_11 DEV (RURBAN on 2018-09-05)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/RURBAN/Scalar-List-Utils-1.50_10/lib/Scalar/Util.pm" >1.50_10 DEV (RURBAN on 2018-09-04)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/RURBAN/Scalar-List-Utils-1.49_10/lib/Scalar/Util.pm" >1.49_10 DEV (RURBAN on 2017-12-18)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/RURBAN/Scalar-List-Utils-1.49_09/lib/Scalar/Util.pm" >1.49_09 DEV (RURBAN on 2017-12-05)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/RURBAN/Scalar-List-Utils-1.49_08/lib/Scalar/Util.pm" >1.49_08 DEV (RURBAN on 2017-12-05)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/RURBAN/Scalar-List-Utils-1.46_08/lib/Scalar/Util.pm" >1.46_08 DEV (RURBAN on 2016-12-11)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/RURBAN/Scalar-List-Utils-1.45_05/lib/Scalar/Util.pm" >1.45_05 DEV (RURBAN on 2016-09-13)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/RURBAN/Scalar-List-Utils-1.45_03/lib/Scalar/Util.pm" >1.45_03 DEV (RURBAN on 2016-06-02)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/RURBAN/Scalar-List-Utils-1.45_02/lib/Scalar/Util.pm" >1.45_02 DEV (RURBAN on 2016-05-28)</option> <optgroup label="BackPAN">' <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.67/lib/Scalar/Util.pm" >1.67 (PEVANS on 2024-10-18)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.64/lib/Scalar/Util.pm" >1.64 (PEVANS on 2024-08-02)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.63/lib/Scalar/Util.pm" >1.63 (PEVANS on 2022-08-08)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.62/lib/Scalar/Util.pm" >1.62 (PEVANS on 2022-03-17)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.61/lib/Scalar/Util.pm" >1.61 (PEVANS on 2022-02-16)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.60/lib/Scalar/Util.pm" >1.60 (PEVANS on 2021-10-08)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.59/lib/Scalar/Util.pm" >1.59 (PEVANS on 2021-09-12)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.58/lib/Scalar/Util.pm" >1.58 (PEVANS on 2021-09-12)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.57/lib/Scalar/Util.pm" >1.57 (PEVANS on 2021-09-11)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.56/lib/Scalar/Util.pm" >1.56 (PEVANS on 2021-03-30)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.55/lib/Scalar/Util.pm" >1.55 (PEVANS on 2020-04-12)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.55-TRIAL/lib/Scalar/Util.pm" >1.55-TRIAL DEV (PEVANS on 2020-04-09)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.54/lib/Scalar/Util.pm" >1.54 (PEVANS on 2020-02-02)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.53/lib/Scalar/Util.pm" >1.53 (PEVANS on 2019-10-24)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.52_001/lib/Scalar/Util.pm" >1.52_001 DEV (PEVANS on 2019-10-23)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.52/lib/Scalar/Util.pm" >1.52 (PEVANS on 2019-08-17)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.51/lib/Scalar/Util.pm" >1.51 (PEVANS on 2019-08-08)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.50/lib/Scalar/Util.pm" >1.50 (PEVANS on 2018-02-20)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.49/lib/Scalar/Util.pm" >1.49 (PEVANS on 2017-09-08)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.48/lib/Scalar/Util.pm" >1.48 (PEVANS on 2017-06-23)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.47/lib/Scalar/Util.pm" >1.47 (PEVANS on 2016-12-22)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.46/lib/Scalar/Util.pm" >1.46 (PEVANS on 2016-09-29)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.45/lib/Scalar/Util.pm" >1.45 (PEVANS on 2016-03-25)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.44_002/lib/Scalar/Util.pm" >1.44_002 DEV (PEVANS on 2016-03-23)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.44_001/lib/Scalar/Util.pm" >1.44_001 DEV (PEVANS on 2016-03-19)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.44/lib/Scalar/Util.pm" >1.44 (PEVANS on 2016-03-17)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.43_005/lib/Scalar/Util.pm" >1.43_005 DEV (PEVANS on 2016-03-17)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.43_004/lib/Scalar/Util.pm" >1.43_004 DEV (PEVANS on 2016-03-17)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.43_003/lib/Scalar/Util.pm" >1.43_003 DEV (PEVANS on 2016-03-17)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.43_002/lib/Scalar/Util.pm" >1.43_002 DEV (PEVANS on 2016-03-16)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.43_001/lib/Scalar/Util.pm" >1.43_001 DEV (PEVANS on 2016-03-16)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.43/lib/Scalar/Util.pm" >1.43 (PEVANS on 2016-02-08)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.42_002/lib/Scalar/Util.pm" >1.42_002 DEV (PEVANS on 2016-02-04)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.42_001/lib/Scalar/Util.pm" >1.42_001 DEV (PEVANS on 2016-02-03)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.42/lib/Scalar/Util.pm" >1.42 (PEVANS on 2015-04-23)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.41/lib/Scalar/Util.pm" >1.41 (PEVANS on 2014-09-05)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.40/lib/Scalar/Util.pm" >1.40 (PEVANS on 2014-08-30)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.39_004/lib/Scalar/Util.pm" >1.39_004 DEV (PEVANS on 2014-08-27)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.39_003/lib/Scalar/Util.pm" >1.39_003 DEV (PEVANS on 2014-08-26)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.39_002/lib/Scalar/Util.pm" >1.39_002 DEV (PEVANS on 2014-08-26)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.39_001/lib/Scalar/Util.pm" >1.39_001 DEV (PEVANS on 2014-08-25)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.39/lib/Scalar/Util.pm" >1.39 (PEVANS on 2014-06-05)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.38/lib/Scalar/Util.pm" >1.38 (PEVANS on 2014-01-22)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.37/lib/Scalar/Util.pm" >1.37 (PEVANS on 2014-01-21)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.36/lib/Scalar/Util.pm" >1.36 (PEVANS on 2014-01-16)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.35/lib/Scalar/Util.pm" >1.35 (PEVANS on 2013-10-19)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.34/lib/Scalar/Util.pm" >1.34 (PEVANS on 2013-10-16)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.33/lib/Scalar/Util.pm" >1.33 (PEVANS on 2013-10-13)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.32/lib/Scalar/Util.pm" >1.32 (PEVANS on 2013-08-31)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.31/lib/Scalar/Util.pm" >1.31 (PEVANS on 2013-08-14)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.30/lib/Scalar/Util.pm" >1.30 (PEVANS on 2013-08-05)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.29_001/lib/Scalar/Util.pm" >1.29_001 DEV (PEVANS on 2013-08-04)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.29/lib/Scalar/Util.pm" >1.29 (PEVANS on 2013-08-01)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.28/lib/Scalar/Util.pm" >1.28 (PEVANS on 2013-08-01)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.27_002/lib/Scalar/Util.pm" >1.27_002 DEV (PEVANS on 2013-07-29)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.27_001/lib/Scalar/Util.pm" >1.27_001 DEV (PEVANS on 2013-07-29)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.27/lib/Scalar/Util.pm" >1.27 (PEVANS on 2012-12-27)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.26_001/lib/Scalar/Util.pm" >1.26_001 DEV (PEVANS on 2012-12-23)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.26/lib/Scalar/Util.pm" >1.26 (PEVANS on 2012-12-16)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.25/lib/Scalar/Util.pm" >1.25 (PEVANS on 2012-03-24)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.24/lib/Scalar/Util.pm" >1.24 (PEVANS on 2012-03-22)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/PEVANS/Scalar-List-Utils-1.23_04/lib/Scalar/Util.pm" >1.23_04 DEV (PEVANS on 2012-03-10)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.23_03/lib/Scalar/Util.pm" >1.23_03 DEV (GBARR on 2010-09-14)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.23_02/lib/Scalar/Util.pm" >1.23_02 DEV (GBARR on 2010-03-30)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.23_01/lib/Scalar/Util.pm" >1.23_01 DEV (GBARR on 2010-03-22)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.23/lib/Scalar/Util.pm" >1.23 (GBARR on 2010-03-11)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.22/lib/Scalar/Util.pm" >1.22 (GBARR on 2009-11-14)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.21/lib/Scalar/Util.pm" >1.21 (GBARR on 2009-05-18)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.20/lib/Scalar/Util.pm" >1.20 (GBARR on 2009-05-13)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.19/lib/Scalar/Util.pm" >1.19 (GBARR on 2006-12-10)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.18/lib/Scalar/Util.pm" >1.18 (GBARR on 2005-11-25)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.17/lib/Scalar/Util.pm" >1.17 (GBARR on 2005-05-23)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.16/lib/Scalar/Util.pm" >1.16 (GBARR on 2005-05-20)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.14/lib/Scalar/Util.pm" >1.14 (GBARR on 2004-05-22)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.13/lib/Scalar/Util.pm" >1.13 (GBARR on 2003-09-25)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.12/lib/Scalar/Util.pm" >1.12 (GBARR on 2003-08-14)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.11/lib/Scalar/Util.pm" >1.11 (GBARR on 2003-02-14)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.10/lib/Scalar/Util.pm" >1.10 (GBARR on 2003-02-04)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.09/lib/Scalar/Util.pm" >1.09 (GBARR on 2002-12-12)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.08/lib/Scalar/Util.pm" >1.08 (GBARR on 2002-11-03)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.0701/lib/Scalar/Util.pm" >1.0701 (GBARR on 2002-04-29)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.07/lib/Scalar/Util.pm" >1.07 (GBARR on 2002-03-18)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.06/lib/Scalar/Util.pm" >1.06 (GBARR on 2001-09-18)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.05/lib/Scalar/Util.pm" >1.05 (GBARR on 2001-09-05)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.04/lib/Scalar/Util.pm" >1.04 (GBARR on 2001-09-05)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.03/lib/Scalar/Util.pm" >1.03 (GBARR on 2001-09-03)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.02/lib/Scalar/Util.pm" >1.02 (GBARR on 2000-04-10)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.01/lib/Scalar/Util.pm" >1.01 (GBARR on 2000-03-03)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-1.00/lib/Scalar/Util.pm" >1.00 (GBARR on 1999-07-16)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.68/diff/GBARR/Scalar-List-Utils-0.10/lib/Scalar/Util.pm" >0.10 (GBARR on 1999-06-01)</option> </optgroup> </select> </li> <li> <ul class="dependencies"> <li class="nav-header">Dependencies</li> <li><i>none</i></li> <li> <hr> </li> <li> <a href="/module/Scalar::Util/requires">Reverse dependencies</a> </li> <li> <a href="http://deps.cpantesters.org/?module=Scalar%3A%3AUtil">CPAN Testers List</a> </li> <li> <a href="https://cpandeps.grinnz.com/?dist=Scalar-List-Utils">Dependency graph</a> </li> </ul> </li> <li class="nav-header">Permalinks</li> <li> <a href="/release/PEVANS/Scalar-List-Utils-1.68/view/lib/Scalar/Util.pm">This version</a> </li> <li> <a href="/pod/Scalar::Util">Latest version</a> </li> <li> <div class="plussers"> <div class="nav-header">++ed by:</div> <div> <a class="display-all" href="/author/KARJALA"><img src="https://www.gravatar.com/avatar/9685932c4be47d9e6370f49230700c40?d=identicon&amp;s=20" title="KARJALA" alt="KARJALA"></a> <a class="display-all" href="/author/BRUNOV"><img src="https://www.gravatar.com/avatar/ff900b4f3eb6504c21691432e187923e?d=identicon&amp;s=20" title="BRUNOV" alt="BRUNOV"></a> <a class="display-all" href="/author/MARKSTOS"><img src="https://www.gravatar.com/avatar/795623cd5c352aafe2d8f3d3bdd712ce?d=identicon&amp;s=20" title="MARKSTOS" alt="MARKSTOS"></a> <a class="display-all" href="/author/WREIS"><img src="https://www.gravatar.com/avatar/0b14bc3a0a18e795beebcffef045bbea?d=identicon&amp;s=20" title="WREIS" alt="WREIS"></a> <a class="display-all" href="/author/CARWASH"><img src="https://www.gravatar.com/avatar/b3a518977704c1b937dd94265abdf7b9?d=identicon&amp;s=20" title="CARWASH" alt="CARWASH"></a> </div> <!-- Display counts of plussers--> <div> <a href="/dist/Scalar-List-Utils/plussers">101 PAUSE users</a> </div> <div> 78 non-PAUSE users </div> </div> </li> <li> <div> <button class="contributors-show-button btn-link">and 1 contributors</button> <div id="metacpan_contributors" class="slide-out slide-out-hidden"> <div> <ul> <li class="contributor" data-cpan-author="GBARR" data-contrib-email="gbarr@cpan.org" > <a href="/author/GBARR" class="cpan-author"> <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/91e0a99c0201988cad4e53833c8aa2b5?d=identicon&amp;s=20" /> Graham Barr </a> </li> </ul> </div> </div> </div> </li> </ul> </div> </nav> <div class="content-navigation"> <div class="breadcrumbs"> <span> <a data-keyboard-shortcut="g a" rel="author" href="/author/PEVANS" class="author-name">Paul Evans</a> </span> <span>&nbsp;/&nbsp;</span> <div class="release dist-release status-latest maturity-released"> <span class="dropdown"><b class="caret"></b></span> <select class="select-navigator "> <option selected value="/release/PEVANS/Scalar-List-Utils-1.68/view/lib/Scalar/Util.pm" >1.68 (PEVANS on 2024-10-18)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.66/view/lib/Scalar/Util.pm" >1.66 (PEVANS on 2024-09-19)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.65/view/lib/Scalar/Util.pm" >1.65 (PEVANS on 2024-08-06)</option> <option value="/release/RURBAN/Scalar-List-Utils-1.50_11/view/lib/Scalar/Util.pm" >1.50_11 DEV (RURBAN on 2018-09-05)</option> <option value="/release/RURBAN/Scalar-List-Utils-1.50_10/view/lib/Scalar/Util.pm" >1.50_10 DEV (RURBAN on 2018-09-04)</option> <option value="/release/RURBAN/Scalar-List-Utils-1.49_10/view/lib/Scalar/Util.pm" >1.49_10 DEV (RURBAN on 2017-12-18)</option> <option value="/release/RURBAN/Scalar-List-Utils-1.49_09/view/lib/Scalar/Util.pm" >1.49_09 DEV (RURBAN on 2017-12-05)</option> <option value="/release/RURBAN/Scalar-List-Utils-1.49_08/view/lib/Scalar/Util.pm" >1.49_08 DEV (RURBAN on 2017-12-05)</option> <option value="/release/RURBAN/Scalar-List-Utils-1.46_08/view/lib/Scalar/Util.pm" >1.46_08 DEV (RURBAN on 2016-12-11)</option> <option value="/release/RURBAN/Scalar-List-Utils-1.45_05/view/lib/Scalar/Util.pm" >1.45_05 DEV (RURBAN on 2016-09-13)</option> <option value="/release/RURBAN/Scalar-List-Utils-1.45_03/view/lib/Scalar/Util.pm" >1.45_03 DEV (RURBAN on 2016-06-02)</option> <option value="/release/RURBAN/Scalar-List-Utils-1.45_02/view/lib/Scalar/Util.pm" >1.45_02 DEV (RURBAN on 2016-05-28)</option> <optgroup label="BackPAN">' <option value="/release/PEVANS/Scalar-List-Utils-1.67/view/lib/Scalar/Util.pm" >1.67 (PEVANS on 2024-10-18)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.64/view/lib/Scalar/Util.pm" >1.64 (PEVANS on 2024-08-02)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.63/view/lib/Scalar/Util.pm" >1.63 (PEVANS on 2022-08-08)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.62/view/lib/Scalar/Util.pm" >1.62 (PEVANS on 2022-03-17)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.61/view/lib/Scalar/Util.pm" >1.61 (PEVANS on 2022-02-16)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.60/view/lib/Scalar/Util.pm" >1.60 (PEVANS on 2021-10-08)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.59/view/lib/Scalar/Util.pm" >1.59 (PEVANS on 2021-09-12)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.58/view/lib/Scalar/Util.pm" >1.58 (PEVANS on 2021-09-12)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.57/view/lib/Scalar/Util.pm" >1.57 (PEVANS on 2021-09-11)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.56/view/lib/Scalar/Util.pm" >1.56 (PEVANS on 2021-03-30)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.55/view/lib/Scalar/Util.pm" >1.55 (PEVANS on 2020-04-12)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.55-TRIAL/view/lib/Scalar/Util.pm" >1.55-TRIAL DEV (PEVANS on 2020-04-09)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.54/view/lib/Scalar/Util.pm" >1.54 (PEVANS on 2020-02-02)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.53/view/lib/Scalar/Util.pm" >1.53 (PEVANS on 2019-10-24)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.52_001/view/lib/Scalar/Util.pm" >1.52_001 DEV (PEVANS on 2019-10-23)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.52/view/lib/Scalar/Util.pm" >1.52 (PEVANS on 2019-08-17)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.51/view/lib/Scalar/Util.pm" >1.51 (PEVANS on 2019-08-08)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.50/view/lib/Scalar/Util.pm" >1.50 (PEVANS on 2018-02-20)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.49/view/lib/Scalar/Util.pm" >1.49 (PEVANS on 2017-09-08)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.48/view/lib/Scalar/Util.pm" >1.48 (PEVANS on 2017-06-23)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.47/view/lib/Scalar/Util.pm" >1.47 (PEVANS on 2016-12-22)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.46/view/lib/Scalar/Util.pm" >1.46 (PEVANS on 2016-09-29)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.45/view/lib/Scalar/Util.pm" >1.45 (PEVANS on 2016-03-25)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.44_002/view/lib/Scalar/Util.pm" >1.44_002 DEV (PEVANS on 2016-03-23)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.44_001/view/lib/Scalar/Util.pm" >1.44_001 DEV (PEVANS on 2016-03-19)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.44/view/lib/Scalar/Util.pm" >1.44 (PEVANS on 2016-03-17)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.43_005/view/lib/Scalar/Util.pm" >1.43_005 DEV (PEVANS on 2016-03-17)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.43_004/view/lib/Scalar/Util.pm" >1.43_004 DEV (PEVANS on 2016-03-17)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.43_003/view/lib/Scalar/Util.pm" >1.43_003 DEV (PEVANS on 2016-03-17)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.43_002/view/lib/Scalar/Util.pm" >1.43_002 DEV (PEVANS on 2016-03-16)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.43_001/view/lib/Scalar/Util.pm" >1.43_001 DEV (PEVANS on 2016-03-16)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.43/view/lib/Scalar/Util.pm" >1.43 (PEVANS on 2016-02-08)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.42_002/view/lib/Scalar/Util.pm" >1.42_002 DEV (PEVANS on 2016-02-04)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.42_001/view/lib/Scalar/Util.pm" >1.42_001 DEV (PEVANS on 2016-02-03)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.42/view/lib/Scalar/Util.pm" >1.42 (PEVANS on 2015-04-23)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.41/view/lib/Scalar/Util.pm" >1.41 (PEVANS on 2014-09-05)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.40/view/lib/Scalar/Util.pm" >1.40 (PEVANS on 2014-08-30)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.39_004/view/lib/Scalar/Util.pm" >1.39_004 DEV (PEVANS on 2014-08-27)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.39_003/view/lib/Scalar/Util.pm" >1.39_003 DEV (PEVANS on 2014-08-26)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.39_002/view/lib/Scalar/Util.pm" >1.39_002 DEV (PEVANS on 2014-08-26)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.39_001/view/lib/Scalar/Util.pm" >1.39_001 DEV (PEVANS on 2014-08-25)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.39/view/lib/Scalar/Util.pm" >1.39 (PEVANS on 2014-06-05)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.38/view/lib/Scalar/Util.pm" >1.38 (PEVANS on 2014-01-22)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.37/view/lib/Scalar/Util.pm" >1.37 (PEVANS on 2014-01-21)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.36/view/lib/Scalar/Util.pm" >1.36 (PEVANS on 2014-01-16)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.35/view/lib/Scalar/Util.pm" >1.35 (PEVANS on 2013-10-19)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.34/view/lib/Scalar/Util.pm" >1.34 (PEVANS on 2013-10-16)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.33/view/lib/Scalar/Util.pm" >1.33 (PEVANS on 2013-10-13)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.32/view/lib/Scalar/Util.pm" >1.32 (PEVANS on 2013-08-31)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.31/view/lib/Scalar/Util.pm" >1.31 (PEVANS on 2013-08-14)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.30/view/lib/Scalar/Util.pm" >1.30 (PEVANS on 2013-08-05)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.29_001/view/lib/Scalar/Util.pm" >1.29_001 DEV (PEVANS on 2013-08-04)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.29/view/lib/Scalar/Util.pm" >1.29 (PEVANS on 2013-08-01)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.28/view/lib/Scalar/Util.pm" >1.28 (PEVANS on 2013-08-01)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.27_002/view/lib/Scalar/Util.pm" >1.27_002 DEV (PEVANS on 2013-07-29)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.27_001/view/lib/Scalar/Util.pm" >1.27_001 DEV (PEVANS on 2013-07-29)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.27/view/lib/Scalar/Util.pm" >1.27 (PEVANS on 2012-12-27)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.26_001/view/lib/Scalar/Util.pm" >1.26_001 DEV (PEVANS on 2012-12-23)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.26/view/lib/Scalar/Util.pm" >1.26 (PEVANS on 2012-12-16)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.25/view/lib/Scalar/Util.pm" >1.25 (PEVANS on 2012-03-24)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.24/view/lib/Scalar/Util.pm" >1.24 (PEVANS on 2012-03-22)</option> <option value="/release/PEVANS/Scalar-List-Utils-1.23_04/view/lib/Scalar/Util.pm" >1.23_04 DEV (PEVANS on 2012-03-10)</option> <option value="/release/GBARR/Scalar-List-Utils-1.23_03/view/lib/Scalar/Util.pm" >1.23_03 DEV (GBARR on 2010-09-14)</option> <option value="/release/GBARR/Scalar-List-Utils-1.23_02/view/lib/Scalar/Util.pm" >1.23_02 DEV (GBARR on 2010-03-30)</option> <option value="/release/GBARR/Scalar-List-Utils-1.23_01/view/lib/Scalar/Util.pm" >1.23_01 DEV (GBARR on 2010-03-22)</option> <option value="/release/GBARR/Scalar-List-Utils-1.23/view/lib/Scalar/Util.pm" >1.23 (GBARR on 2010-03-11)</option> <option value="/release/GBARR/Scalar-List-Utils-1.22/view/lib/Scalar/Util.pm" >1.22 (GBARR on 2009-11-14)</option> <option value="/release/GBARR/Scalar-List-Utils-1.21/view/lib/Scalar/Util.pm" >1.21 (GBARR on 2009-05-18)</option> <option value="/release/GBARR/Scalar-List-Utils-1.20/view/lib/Scalar/Util.pm" >1.20 (GBARR on 2009-05-13)</option> <option value="/release/GBARR/Scalar-List-Utils-1.19/view/lib/Scalar/Util.pm" >1.19 (GBARR on 2006-12-10)</option> <option value="/release/GBARR/Scalar-List-Utils-1.18/view/lib/Scalar/Util.pm" >1.18 (GBARR on 2005-11-25)</option> <option value="/release/GBARR/Scalar-List-Utils-1.17/view/lib/Scalar/Util.pm" >1.17 (GBARR on 2005-05-23)</option> <option value="/release/GBARR/Scalar-List-Utils-1.16/view/lib/Scalar/Util.pm" >1.16 (GBARR on 2005-05-20)</option> <option value="/release/GBARR/Scalar-List-Utils-1.14/view/lib/Scalar/Util.pm" >1.14 (GBARR on 2004-05-22)</option> <option value="/release/GBARR/Scalar-List-Utils-1.13/view/lib/Scalar/Util.pm" >1.13 (GBARR on 2003-09-25)</option> <option value="/release/GBARR/Scalar-List-Utils-1.12/view/lib/Scalar/Util.pm" >1.12 (GBARR on 2003-08-14)</option> <option value="/release/GBARR/Scalar-List-Utils-1.11/view/lib/Scalar/Util.pm" >1.11 (GBARR on 2003-02-14)</option> <option value="/release/GBARR/Scalar-List-Utils-1.10/view/lib/Scalar/Util.pm" >1.10 (GBARR on 2003-02-04)</option> <option value="/release/GBARR/Scalar-List-Utils-1.09/view/lib/Scalar/Util.pm" >1.09 (GBARR on 2002-12-12)</option> <option value="/release/GBARR/Scalar-List-Utils-1.08/view/lib/Scalar/Util.pm" >1.08 (GBARR on 2002-11-03)</option> <option value="/release/GBARR/Scalar-List-Utils-1.0701/view/lib/Scalar/Util.pm" >1.0701 (GBARR on 2002-04-29)</option> <option value="/release/GBARR/Scalar-List-Utils-1.07/view/lib/Scalar/Util.pm" >1.07 (GBARR on 2002-03-18)</option> <option value="/release/GBARR/Scalar-List-Utils-1.06/view/lib/Scalar/Util.pm" >1.06 (GBARR on 2001-09-18)</option> <option value="/release/GBARR/Scalar-List-Utils-1.05/view/lib/Scalar/Util.pm" >1.05 (GBARR on 2001-09-05)</option> <option value="/release/GBARR/Scalar-List-Utils-1.04/view/lib/Scalar/Util.pm" >1.04 (GBARR on 2001-09-05)</option> <option value="/release/GBARR/Scalar-List-Utils-1.03/view/lib/Scalar/Util.pm" >1.03 (GBARR on 2001-09-03)</option> <option value="/release/GBARR/Scalar-List-Utils-1.02/view/lib/Scalar/Util.pm" >1.02 (GBARR on 2000-04-10)</option> <option value="/release/GBARR/Scalar-List-Utils-1.01/view/lib/Scalar/Util.pm" >1.01 (GBARR on 2000-03-03)</option> <option value="/release/GBARR/Scalar-List-Utils-1.00/view/lib/Scalar/Util.pm" >1.00 (GBARR on 1999-07-16)</option> <option value="/release/GBARR/Scalar-List-Utils-0.10/view/lib/Scalar/Util.pm" >0.10 (GBARR on 1999-06-01)</option> </optgroup> </select> <a data-keyboard-shortcut="g d" class="release-name" href="/dist/Scalar-List-Utils">Scalar-List-Utils-1.68</a> </div> <span class="river-gauge-gauge"> <svg width="24px" height="15px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g> <title> River stage five &#10; • 4117 direct dependents &#10; • 33320 total dependents </title> <rect x="0" y="0" width="4" height="15" fill="#7ea3f2" /> <rect x="5" y="0" width="4" height="15" fill="#7ea3f2" /> <rect x="10" y="0" width="4" height="15" fill="#7ea3f2" /> <rect x="15" y="0" width="4" height="15" fill="#7ea3f2" /> <rect x="20" y="0" width="4" height="15" fill="#7ea3f2" /> </g> </svg> </span> <div id="Scalar-List-Utils-fav" class="show-logged-in"> <form action="/account/favorite/add" style="display: inline" method="POST"> <input type="hidden" name="remove" value="0"> <input type="hidden" name="release" value="Scalar-List-Utils-1.68"> <input type="hidden" name="author" value="PEVANS"> <input type="hidden" name="distribution" value="Scalar-List-Utils"> <button type="submit" class="favorite highlight"><span>179</span> ++</button> </form> </div> <div class="show-logged-out"> <button class="fav-not-logged-in favorite highlight"><span>179</span> ++</button> </div> / <span>Scalar::Util</span> </div> </div> <main class="content"> <nav class="toc"> <div class="toc-header"><strong>Contents</strong></div> <ul> <li><a href="#NAME">NAME</a></li> <li><a href="#SYNOPSIS">SYNOPSIS</a></li> <li><a href="#DESCRIPTION">DESCRIPTION</a> <ul> <li><a href="#Core-Perl-builtin-Functions">Core Perl builtin Functions</a></li> </ul> </li> <li><a href="#FUNCTIONS-FOR-REFERENCES">FUNCTIONS FOR REFERENCES</a> <ul> <li><a href="#blessed">blessed</a></li> <li><a href="#refaddr">refaddr</a></li> <li><a href="#reftype">reftype</a></li> <li><a href="#weaken">weaken</a></li> <li><a href="#unweaken">unweaken</a></li> <li><a href="#isweak">isweak</a></li> </ul> </li> <li><a href="#OTHER-FUNCTIONS">OTHER FUNCTIONS</a> <ul> <li><a href="#dualvar">dualvar</a></li> <li><a href="#isdual">isdual</a></li> <li><a href="#isvstring">isvstring</a></li> <li><a href="#looks_like_number">looks_like_number</a></li> <li><a href="#openhandle">openhandle</a></li> <li><a href="#readonly">readonly</a></li> <li><a href="#set_prototype">set_prototype</a></li> <li><a href="#tainted">tainted</a></li> </ul> </li> <li><a href="#DIAGNOSTICS">DIAGNOSTICS</a></li> <li><a href="#KNOWN-BUGS">KNOWN BUGS</a></li> <li><a href="#SEE-ALSO">SEE ALSO</a></li> <li><a href="#COPYRIGHT">COPYRIGHT</a></li> </ul></nav> <div class="pod anchors"> <h1 id="NAME">NAME</h1> <p>Scalar::Util - A selection of general-utility scalar subroutines</p> <h1 id="SYNOPSIS">SYNOPSIS</h1> <pre><code>use Scalar::Util qw(blessed dualvar isdual readonly refaddr reftype tainted weaken isweak isvstring looks_like_number set_prototype); # and other useful utils appearing below</code></pre> <h1 id="DESCRIPTION">DESCRIPTION</h1> <p><code>Scalar::Util</code> contains a selection of subroutines that people have expressed would be nice to have in the perl core, but the usage would not really be high enough to warrant the use of a keyword, and the size would be so small that being individual extensions would be wasteful.</p> <p>By default <code>Scalar::Util</code> does not export any subroutines.</p> <h2 id="Core-Perl-builtin-Functions"><a id="Core"></a>Core Perl <code>builtin</code> Functions</h2> <p>Many functions in this module have served as the inspiration for a new experimental facility in recent versions of Perl. From various development versions, starting at 5.35.7, equivalent functions to many of these utilities are available in the <code>builtin::</code> package.</p> <pre><code>use Scalar::Util qw(blessed); $class = blessed $obj; $class = builtin::blessed $obj; # equivalent</code></pre> <p>For more information, see the documentation on <a href="/pod/builtin">builtin</a>.</p> <h1 id="FUNCTIONS-FOR-REFERENCES"><a id="FUNCTIONS"></a>FUNCTIONS FOR REFERENCES</h1> <p>The following functions all perform some useful activity on reference values.</p> <h2 id="blessed">blessed</h2> <pre><code>my $pkg = blessed( $ref );</code></pre> <p>If <code>$ref</code> is a blessed reference, the name of the package that it is blessed into is returned. Otherwise <code>undef</code> is returned.</p> <pre><code>$scalar = &quot;foo&quot;; $class = blessed $scalar; # undef $ref = []; $class = blessed $ref; # undef $obj = bless [], &quot;Foo&quot;; $class = blessed $obj; # &quot;Foo&quot;</code></pre> <p>Take care when using this function simply as a truth test (such as in <code>if(blessed $ref)...</code>) because the package name <code>&quot;0&quot;</code> is defined yet false.</p> <p><i>Since Perl version 5.35.7</i> an equivalent function is available as <code>builtin::blessed</code>.</p> <h2 id="refaddr">refaddr</h2> <pre><code>my $addr = refaddr( $ref );</code></pre> <p>If <code>$ref</code> is reference, the internal memory address of the referenced value is returned as a plain integer. Otherwise <code>undef</code> is returned.</p> <pre><code>$addr = refaddr &quot;string&quot;; # undef $addr = refaddr \$var; # eg 12345678 $addr = refaddr []; # eg 23456784 $obj = bless {}, &quot;Foo&quot;; $addr = refaddr $obj; # eg 88123488</code></pre> <p><i>Since Perl version 5.35.7</i> an equivalent function is available as <code>builtin::refaddr</code>.</p> <h2 id="reftype">reftype</h2> <pre><code>my $type = reftype( $ref );</code></pre> <p>If <code>$ref</code> is a reference, the basic Perl type of the variable referenced is returned as a plain string (such as <code>ARRAY</code> or <code>HASH</code>). Otherwise <code>undef</code> is returned.</p> <pre><code>$type = reftype &quot;string&quot;; # undef $type = reftype \$var; # SCALAR $type = reftype []; # ARRAY $obj = bless {}, &quot;Foo&quot;; $type = reftype $obj; # HASH</code></pre> <p>Note that for internal reasons, all precompiled regexps (<code>qr/.../</code>) are blessed references; thus <code>ref()</code> returns the package name string <code>&quot;Regexp&quot;</code> on these but <code>reftype()</code> will return the underlying C structure type of <code>&quot;REGEXP&quot;</code> in all capitals.</p> <p><i>Since Perl version 5.35.7</i> an equivalent function is available as <code>builtin::reftype</code>.</p> <h2 id="weaken">weaken</h2> <pre><code>weaken( $ref );</code></pre> <p>The lvalue <code>$ref</code> will be turned into a weak reference. This means that it will not hold a reference count on the object it references. Also, when the reference count on that object reaches zero, the reference will be set to undef. This function mutates the lvalue passed as its argument and returns no value.</p> <p>This is useful for keeping copies of references, but you don&#39;t want to prevent the object being DESTROY-ed at its usual time.</p> <pre><code>{ my $var; $ref = \$var; weaken($ref); # Make $ref a weak reference } # $ref is now undef</code></pre> <p>Note that if you take a copy of a scalar with a weakened reference, the copy will be a strong reference.</p> <pre><code>my $var; my $foo = \$var; weaken($foo); # Make $foo a weak reference my $bar = $foo; # $bar is now a strong reference</code></pre> <p>This may be less obvious in other situations, such as <code>grep()</code>, for instance when grepping through a list of weakened references to objects that may have been destroyed already:</p> <pre><code>@object = grep { defined } @object;</code></pre> <p>This will indeed remove all references to destroyed objects, but the remaining references to objects will be strong, causing the remaining objects to never be destroyed because there is now always a strong reference to them in the @object array.</p> <p><i>Since Perl version 5.35.7</i> an equivalent function is available as <code>builtin::weaken</code>.</p> <h2 id="unweaken">unweaken</h2> <pre><code>unweaken( $ref );</code></pre> <p><i>Since version 1.36.</i></p> <p>The lvalue <code>REF</code> will be turned from a weak reference back into a normal (strong) reference again. This function mutates the lvalue passed as its argument and returns no value. This undoes the action performed by <a href="#weaken">&quot;weaken&quot;</a>.</p> <p>This function is slightly neater and more convenient than the otherwise-equivalent code</p> <pre><code>my $tmp = $REF; undef $REF; $REF = $tmp;</code></pre> <p>(because in particular, simply assigning a weak reference back to itself does not work to unweaken it; <code>$REF = $REF</code> does not work).</p> <p><i>Since Perl version 5.35.7</i> an equivalent function is available as <code>builtin::unweaken</code>.</p> <h2 id="isweak">isweak</h2> <pre><code>my $weak = isweak( $ref );</code></pre> <p>Returns true if <code>$ref</code> is a weak reference.</p> <pre><code>$ref = \$foo; $weak = isweak($ref); # false weaken($ref); $weak = isweak($ref); # true</code></pre> <p><b>NOTE</b>: Copying a weak reference creates a normal, strong, reference.</p> <pre><code>$copy = $ref; $weak = isweak($copy); # false</code></pre> <p><i>Since Perl version 5.35.7</i> an equivalent function is available as <code>builtin::is_weak</code>.</p> <h1 id="OTHER-FUNCTIONS"><a id="OTHER"></a>OTHER FUNCTIONS</h1> <h2 id="dualvar">dualvar</h2> <pre><code>my $var = dualvar( $num, $string );</code></pre> <p>Returns a scalar that has the value <code>$num</code> in a numeric context and the value <code>$string</code> in a string context.</p> <pre><code>$foo = dualvar 10, &quot;Hello&quot;; $num = $foo + 2; # 12 $str = $foo . &quot; world&quot;; # Hello world</code></pre> <h2 id="isdual">isdual</h2> <pre><code>my $dual = isdual( $var );</code></pre> <p><i>Since version 1.26.</i></p> <p>If <code>$var</code> is a scalar that has both numeric and string values, the result is true.</p> <pre><code>$foo = dualvar 86, &quot;Nix&quot;; $dual = isdual($foo); # true</code></pre> <p>Note that a scalar can be made to have both string and numeric content through standard operations:</p> <pre><code>$foo = &quot;10&quot;; $dual = isdual($foo); # false $bar = $foo + 0; $dual = isdual($foo); # true</code></pre> <p>The <code>$!</code> variable is commonly dual-valued, though it is also magical in other ways:</p> <pre><code>$! = 1; $dual = isdual($!); # true print(&quot;$!\n&quot;); # &quot;Operation not permitted&quot;</code></pre> <p><b>CAUTION</b>: This function is not as useful as it may seem. Dualvars are not a distinct concept in Perl, but a standard internal construct of all scalar values. Almost any value could be considered as a dualvar by this function through the course of normal operations.</p> <h2 id="isvstring">isvstring</h2> <pre><code>my $vstring = isvstring( $var );</code></pre> <p>If <code>$var</code> is a scalar which was coded as a vstring, the result is true.</p> <pre><code>$vs = v49.46.48; $fmt = isvstring($vs) ? &quot;%vd&quot; : &quot;%s&quot;; #true printf($fmt,$vs);</code></pre> <h2 id="looks_like_number">looks_like_number</h2> <pre><code>my $isnum = looks_like_number( $var );</code></pre> <p>Returns true if perl thinks <code>$var</code> is a number. See <a href="/pod/perlapi#looks_like_number">&quot;looks_like_number&quot; in perlapi</a>.</p> <h2 id="openhandle">openhandle</h2> <pre><code>my $fh = openhandle( $fh );</code></pre> <p>Returns <code>$fh</code> itself, if <code>$fh</code> may be used as a filehandle and is open, or if it is a tied handle. Otherwise <code>undef</code> is returned.</p> <pre><code>$fh = openhandle(*STDIN); # \*STDIN $fh = openhandle(\*STDIN); # \*STDIN $fh = openhandle(*NOTOPEN); # undef $fh = openhandle(&quot;scalar&quot;); # undef</code></pre> <h2 id="readonly">readonly</h2> <pre><code>my $ro = readonly( $var );</code></pre> <p>Returns true if <code>$var</code> is readonly.</p> <pre><code>sub foo { readonly($_[0]) } $readonly = foo($bar); # false $readonly = foo(0); # true</code></pre> <h2 id="set_prototype">set_prototype</h2> <pre><code>my $code = set_prototype( $code, $prototype );</code></pre> <p>Sets the prototype of the function given by the <code>$code</code> reference, or deletes it if <code>$prototype</code> is <code>undef</code>. Returns the <code>$code</code> reference itself.</p> <pre><code>set_prototype \&amp;foo, &#39;$$&#39;;</code></pre> <h2 id="tainted">tainted</h2> <pre><code>my $t = tainted( $var );</code></pre> <p>Return true if <code>$var</code> is tainted.</p> <pre><code>$taint = tainted(&quot;constant&quot;); # false $taint = tainted($ENV{PWD}); # true if running under -T</code></pre> <h1 id="DIAGNOSTICS">DIAGNOSTICS</h1> <p>Module use may give one of the following errors during import.</p> <dl> <dt id="Vstrings-are-not-implemented-in-this-version-of-perl"><a id="Vstrings"></a>Vstrings are not implemented in this version of perl</dt> <dd> <p>The version of perl that you are using does not implement Vstrings, to use <a href="#isvstring">&quot;isvstring&quot;</a> you will need to use a newer release of perl.</p> </dd> </dl> <h1 id="KNOWN-BUGS"><a id="KNOWN"></a>KNOWN BUGS</h1> <p>There is a bug in perl5.6.0 with UV&#39;s that are &gt;= 1&lt;&lt;31. This will show up as tests 8 and 9 of dualvar.t failing</p> <h1 id="SEE-ALSO"><a id="SEE"></a>SEE ALSO</h1> <p><a href="/pod/List::Util">List::Util</a></p> <h1 id="COPYRIGHT">COPYRIGHT</h1> <p>Copyright (c) 1997-2007 Graham Barr &lt;gbarr@pobox.com&gt;. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.</p> <p>Additionally <a href="#weaken">&quot;weaken&quot;</a> and <a href="#isweak">&quot;isweak&quot;</a> which are</p> <p>Copyright (c) 1999 Tuomas J. Lukka &lt;lukka@iki.fi&gt;. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as perl itself.</p> <p>Copyright (C) 2004, 2008 Matthijs van Duin. All rights reserved. Copyright (C) 2014 cPanel Inc. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.</p></div> <div id="metacpan_install-instructions-dialog" class="modal fade"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <h4 class="modal-title">Module Install Instructions</h4> </div> <div class="modal-body"> <p>To install Scalar::List::Utils, copy and paste the appropriate command in to your terminal.</p> <p><a href="/dist/App-cpanminus/view/bin/cpanm">cpanm</a></p> <pre><code>cpanm Scalar::List::Utils</code></pre> <p><a href="/pod/CPAN">CPAN shell</a></p> <pre><code>perl -MCPAN -e shell install Scalar::List::Utils</code></pre> <p>For more information on module installation, please visit <a href="https://www.cpan.org/modules/INSTALL.html">the detailed CPAN module installation guide</a>.</p> </div> <div class="modal-footer"> <a href="#" data-dismiss="modal" class="btn">Close</a> </div> </div> </div> </div> </main> <div class="content-pagination"> </div> </div> <footer class="footer"> <div class="footer-container"> <div class="footer-social"> <div class="footer-link footer-logo"> <a href="/"> <img src="/static/images/metacpan-logo.svg" alt="MetaCPAN" /> </a> </div> <a class="footer-social-link" href="https://github.com/metacpan"> <i class="fab fa-github-square"></i> </a> <a class="footer-social-link" href="https://fosstodon.org/@metacpan"> <i class="fab fa-mastodon"></i> </a> </div> <div class="footer-links"> <div class="footer-link"> <a href="/about">About</a> </div> <div class="footer-link"> <a href="/about/sponsors">Sponsor</a> </div> <div class="footer-link"> <a href="https://grep.metacpan.org">grep::cpan</a> </div> <div class="footer-link"> <a href="/recent">Recent</a> </div> <div class="footer-link"> <a href="/about/faq">FAQ</a> </div> <div class="footer-link"> <a href="/tools">Tools</a> </div> <div class="footer-link"> <a href="https://fastapi.metacpan.org/">API</a> </div> <div class="footer-link"> <a href="https://www.perl.org/">Perl.org</a> </div> </div> <div class="footer-sponsors"> <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener"> <img class="footer-sponsor-bytemark" src="/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo"> </a> <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener"> <img class="footer-sponsor-liquidweb" src="/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo"> </a> <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener"> <img class="footer-sponsor-deriv" src="/static/images/sponsors/deriv.svg" alt="Deriv logo"> </a> <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener"> <img class="footer-sponsor-geocode" src="/static/images/sponsors/geocodelogo.svg" alt="Geocode logo"> </a> <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener"> <img class="footer-sponsor-fastly" src="/static/images/sponsors/fastly_logo.svg" alt="Fastly logo"> </a> <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener"> <img class="footer-sponsor-opencage" src="/static/images/sponsors/open-cage.svg" alt="OpenCage logo"> </a> <!-- Added 2024-07-22 --> <a class="footer-sponsor-link" target="_blank" href="https://www.elastic.co/" rel="noopener"> <img class="footer-sponsor-elastic" src="/static/images/sponsors/elastic.svg" alt="Elastic logo"> </a> <!-- Added 2024-07-22 --> <a class="footer-sponsor-link" target="_blank" href="https://route4me.com/" rel="noopener"> <img class="footer-sponsor-route4me" src="/static/images/sponsors/route4me.png" alt="Route4Me logo"> </a> </div> </div> </footer> <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">&times;</button> <h4 class="modal-title">Keyboard Shortcuts</h4> </div> <div class="modal-body row"> <div class="col-md-6"> <table class="table keyboard-shortcuts"> <thead> <tr> <th></th> <th>Global</th> </tr> </thead> <tbody> <tr> <td class="keys"> <kbd>s</kbd> </td> <td>Focus search bar</td> </tr> <tr> <td class="keys"> <kbd>?</kbd> </td> <td>Bring up this help dialog</td> </tr> </tbody> </table> <table class="table keyboard-shortcuts"> <thead> <tr> <th></th> <th>GitHub</th> </tr> </thead> <tbody> <tr> <td class="keys"> <kbd>g</kbd> <kbd>p</kbd> </td> <td>Go to pull requests</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>i</kbd> </td> <td>go to github issues (only if github is preferred repository)</td> </tr> </tbody> </table> </div> <div class="col-md-6"> <table class="table keyboard-shortcuts"> <thead> <tr> <th></th> <th>POD</th> </tr> </thead> <tbody> <tr> <td class="keys"> <kbd>g</kbd> <kbd>a</kbd> </td> <td>Go to author</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>c</kbd> </td> <td>Go to changes</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>i</kbd> </td> <td>Go to issues</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>d</kbd> </td> <td>Go to dist</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>r</kbd> </td> <td>Go to repository/SCM</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>s</kbd> </td> <td>Go to source</td> </tr> <tr> <td class="keys"> <kbd>g</kbd> <kbd>b</kbd> </td> <td>Go to file browse</td> </tr> </tbody> </table> </div> <div class="col-md-12"> <table class="table keyboard-shortcuts"> <thead> <tr> <th></th> <th>Search terms</th> </tr> </thead> <tbody> <tr> <td><em>module:</em> (e.g. <a href="/search?q=module%3APlugin">module:Plugin</a>)</td> </tr> <tr> <td><em>distribution:</em> (e.g. <a href="/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td> </tr> <tr> <td><em>author:</em> (e.g. <a href="/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td> </tr> <tr> <td><em>version:</em> (e.g. <a href="/search?q=version%3A1.00">version:1.00</a>)</td> </tr> </tbody> </table> </div> </div> <div class="modal-footer"></div> </div> </div> </div> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10