Help for this page

Select Code to Download


  1. or download this
      return wantarray ? @arr : $arr[-1];
  2. or download this
      return @arr[0..$#arr];
  3. or download this
      my ($x) = foo(...);
  4. or download this
      sub get_headers {
        my $self = shift;
        my @headers = @_;
    ...
        my @values = @{$self->{headers}}{@headers};
        return @values;
      }
    
  5. or download this
      my ($recipient, $sender) = $obj->get_headers('to', 'from');
  6. or download this
      my ($recipient) = $obj->get_headers('to');
  7. or download this
      return wantarray ? @values : $values[0];
  8. or download this
      my $recipient = $obj->get_headers('to');
  9. or download this
      my $recipient = $obj->get_headers('to', 'from');
  10. or download this
      return @results if wantarray;
      carp("More than one value in result in scalar context")
        if @results > 1;
      return $results[0];