Help for this page

Select Code to Download


  1. or download this
    my ($x, $y, $z) = ('', '', '');
    ($x, $y, $z) = split(',', $_);
    
  2. or download this
    $_ = 'a,b';
    my ($x, $y, $z) = ('', '', '');
    ($x, $y, $z) = split(',', $_);
    print(defined($z)?'defined':'undefined', "\n");
    # prints undefined.
    
  3. or download this
    my ($x, $y, $z) = map { defined($_)?$_:'' } (split(',', $_))[0..2];