None, any golfing here would be awkward for just 3 arrays and too hard to maintain.
Truth is - like you already realized - that it doesn't make sense to have three different arrays.
This
my ($url, $id, $title) = ($_ =~ m|<h6 class="project-title"><a hre +f="(/proje +cts/(\d+)/.+?\?ref=discovery)" target="">(.+?)</a></h6>|o ); push @project, [$url, $id, $title];
already does the trick.
( IMHO even better $project{$id} = [$url,$title] )
Please note that I didn't try to replace ($url, $id, $title) with @matches cause you'd loose self-documenting names.
But if you really want to condense it further try
push @project, [ m|<h6 class="project-title"> ... yadda ... </h6>| +o ];
HTH!
PS: As a side note, better dump references
dump \@urls, \@ids, \@titles;
In reply to Re: What is Perl way to simultaneously assign to three separate arrays?
by LanX
in thread What is Perl way to simultaneously assign to three separate arrays?
by CoVAX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |