so the problem is the folloving:
it is probably something stupid , as i am quite tired but why isn't the second case being evaluated (or it is but why is it returning 0 )perl -le '$t="a/b"; if ($t =~/^(.*?)\//){$z=$1}elsif($t=~/\/(.*)/){$z= + $1} print $z' #prints a perl -le '$t="/b"; if ($t =~/^(.*?)\//){$z=$1}elsif($t=~/\/(.*)/){$z= +$1} print $z' #prints nothing
thnx
baxy
In reply to Basic but stupid problem i cannot wrap my head around by baxy77bax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |