#!/usr/bin/perl use strict; my @results; # what I thought would work ok.. @results = blah('"or"') || blah('"or"') || blah('"or"'); # an attempt to fix.. @results = (blah('"(or)"')) || (blah('"(or)"')) || (blah('"(or)"')); # an ugly solution that works.. if (@results = blah('"if"')){ } elsif (@results = blah('"if"')) { } elsif (@results = blah('"if"')) { } # not as ugly, but still a hack for (1){ last if @results = blah('"for"'); last if @results = blah('"for"'); last if @results = blah('"for'); last; } sub blah{ my ($call) = @_; print "$call "; print wantarray ? "wants array" : "wants string"; print "\n"; return (1,2,3); } __END__ ]$ perl wantarr.pl "or" wants string "(or)" wants string "if" wants array "for" wants array