if (($temp=~s/(\d{1,2}x\d{1,2})//i) or ($temp=~s/(s\d{1,2}e\d{1,2})//i) ) { $inventory{$_}=$1; }