in reply to Read datastructure
It's a reference to an array of hash refs, so you must de-reference it first.
#!/usr/bin/perl use strict; use warnings; my $VAR1 = [ { 'sourceL' => 'spacecraft', 'source' => 'MT', 'targetL' => 'vaisseau spatial' } ]; for (@$VAR1) { print ucfirst $_->{targetL} ; }
See perldsc for lots more.
🦛
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Read datastructure
by Anonymous Monk on Feb 05, 2021 at 23:49 UTC |