search for: wantarray

Displaying 5 results from an estimated 5 matches for "wantarray".

Did you mean: natarray
2006 Sep 14
4
WAIT FOR DIGIT not working
...nd presently am on 1.2.12.1. My script is simple: ------------------------------------------------------------------------ #!/usr/bin/perl use POSIX; $| = 1; sub trim { my @out = @_; for (@out) { s/^\s+//; s/\s+$//; } return wantarray ? @out : $out[0]; } while(<STDIN>) { chomp; last unless length($_); if (/^agi_(\w+)\:\s+(.*)$/) { $AGI{$1} = $2; } } print "EXEC Ringing\n"; print "EXEC Wait 1\n"; print "EXEC Answer\n"; print "EXEC Festival...
2007 Jun 30
2
Determining whether a function's return value is assigned
....assigned()) { bigobject } else { summary(bigobject) } } and x <- myfunction() # bigobject is assigned myfunction() # summary of bigobject is printed Octave and MATLAB have the nargout function that does what I want, and Perl has the wantarray function detecting the context in which a function is called. Perhaps match.call() can be made to do what I want, but, if so, I don't see it in reading the documentation. Sincerely, Paul Laub
2023 Apr 04
5
[RFC PATCH 0/5] fstests specific MAINTAINERS file
I think I might be mad to include that many mailing lists in this patchset... As I explained in [PATCH 1/5], fstests covers more and more fs testing thing, so we always get help from fs specific mailing list, due to they learn about their features and bugs more. Besides that, some folks help to review patches (relevant with them) more often. So I'd like to bring in the similar way of
2012 Jul 14
6
[PATCH 0/6] Allow non-optargs functions to gain optional arguments.
This rather complex set of patches allow non-optargs functions to gain optional arguments, while preserving source and binary backwards compatibility. The problem is that we cannot add an optional argument to an existing function. For example, we might want to add flags to the 'lvresize' API which currently has no optional arguments.
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...= Sys::Guestfs->new (); foreach (@images) { - if ($readwrite) { - $g->add_drive ($_); - } else { - $g->add_drive_ro ($_); - } + if ($readwrite) { + $g->add_drive ($_); + } else { + $g->add_drive_ro ($_); + } } return wantarray ? ($g, $conn, $dom, @images) : $g @@ -239,7 +239,7 @@ sub _is_pv { my $t = shift; foreach (@_) { - return 1 if $_ eq $t; + return 1 if $_ eq $t; } 0; } @@ -271,8 +271,8 @@ sub resolve_windows_path my $path = shift; if (substr ($path, 0, 1) ne "/") {...