Well, if there's a source filter, or if 'some expression' invokes some XS code that walks the parse tree, there might be a difference. But normally, there won't be any semantic difference.
There will be a small speed difference though, since the second expression will store an undefined value in
$x before assigning 'some expression':
#!/usr/bin/perl
use strict;
use warnings;
no warnings qw /syntax/;
use Benchmark qw /cmpthese/;
cmpthese -1 => {
single => 'my $x = "foo"',
double => 'my $x; $x = "foo"',
};
__END__
Rate double single
double 2710223/s -- -14%
single 3143931/s 16% --
Abigail