Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

reference vers grep

3 réponses
Avatar
luc2
salut,

ca marche pas :

my $reference = grep !/truc a eliminer/ @tableau;

c'est possible de recuperer une reference vers le tableau, sans passer par une
variable auxiliaire ?

3 réponses

Avatar
xavier
luc2 wrote:

c'est possible de recuperer une reference vers le tableau, sans passer par une
variable auxiliaire ?



D'après "perldoc -f grep" on dirait que non, pas directement.

--
XAv
In your pomp and all your glory you're a poorer man than me,
as you lick the boots of death born out of fear.
(Jethro Tull)
Avatar
espie
In article <1kaip3e.b1j35m1kfi6k9N%,
Xavier wrote:
luc2 wrote:

c'est possible de recuperer une reference vers le tableau, sans passer par une
variable auxiliaire ?



D'après "perldoc -f grep" on dirait que non, pas directement.



Si, bien sur.

my $r = [ grep ... ];

marche sans le moindre probleme.
Avatar
xavier
Marc Espie wrote:

my $r = [ grep ... ];

marche sans le moindre probleme.



Grmblbl. En plus je l'utilise....

--
XAv
In your pomp and all your glory you're a poorer man than me,
as you lick the boots of death born out of fear.
(Jethro Tull)