#apache #archlinux #asterisk #centos #debian #gentoo #haskell #kde #kubuntu #lisp #math #mysql #perl #python #ruby-lang #rubyonrails #suse #ubuntu #vim #wikipedia 0 1 2 3 4 5 6 7 8 9 10 11 12
Top Prev 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 Next
#perl
<Ripe_> can I do...
<Ripe_> my @ar; my %hs; $hs->{foo} = @ar;
<Ripe_> ?
<thrig> does it work? What are you trying to do?
<Ripe_> seems to fail
<thrig> fail how?
<thrig> http://perldoc.perl.org/perlreftut.html
<Ripe_> when I do
<Ripe_> @arcpy = $hs->{foo}
<Ripe_> the array seems to be broken
<Ripe_> wait a second, let me try again
<mauke> uh, $foo = @bar; stores the number of elements of @bar in $foo
<thrig> no, it's not. You're not using references
<Ripe_> exactly mauke
<mauke> it doesn't copy the array
<rick[lvd]> @arcpy = @{ $hs->{foo} }
<thrig> and prior to that, a strategic \
<Ripe_> $hs->{foo} = \@ar; ?
<rick[lvd]> yes
<Ripe_> and if this @ar
<Daveman> heh
<Ripe_> is returned by function...
<Ripe_> how can I do it directly?
<thrig> didn't this exact problem come up last night?
<Elly> HAHA
<Elly> cameron is going to sex house up
<Elly> er
<Elly> not house
<mauke> $hs->{foo} = [ zomg() ];
<Elly> chase
<rick[lvd]> zomg!!!
<Ripe_> thanks mauke
<Ripe_> :)
<Ripe_> Perl syntax is hard sometimes :$
<rick[lvd]> perlreftut will teach all of this
<lucs_> Ripe_: Really: perlreftut
<rick[lvd]> it's simple
<Ripe_> yes, may b? :$
<Ripe_> thanks guys :)
<Ripe_> i love u all
<rick[lvd]> :$ looks like perl syntax :D
<mauke> this isn't syntax, it's semantics
<Ripe_> :-)
<Ripe_> yes!
<Ripe_> hehehe
<Ripe_> mauke, It's also syntax
<mauke> (assign $foo (ref @bar)) ... (assign @baz (array-deref $foo))
<mauke> better?
<Ripe_> cool
<_rodrigo> Hello! I'm trying to install CPAN's Cellular::Automata::Wolfram but it says "WARNING: Setting ABSTRACT via file 'Wolfram.pm' failed" :( Help!
Previous Page Next Page