#perl - Tue 3 Apr 2007 between 00:06 and 00:09

NY Lost Funds



dondelelcaroyou turn it into an array, then you evaluate that in scalar context
ScribbleJspaffum - maybe you want join?
snclndoes it matter to you how he asks if you want to truly help people?
kalilawhat's an easy array inclusion test? if "some word" exists in @array?
maukespaffum: what you're asking doesn't make sense
QtPlatypusspaffum: You wish to get a count of the elements?
ScribbleJOh, spaffum, use "scalar"
maukekalila: perldoc -q contain
spaffumi want to get the count of elems in an if statement
ScribbleJif($count == scalar @array)
dondelelcarospaffum: but odds are you're talking about evaluating an array in scalar context, not a list.
peshaltoScribbleJ: extra =
spaffumah okay thanks that's what i was looking for
Khisanthspaffum: something is not adding up, you have a literal list and you need to know the count?
peshaltoScribbleJ: crap, no, sorry
ScribbleJpeshalto, what?!
spaffumit's an array
ScribbleJ:P
kalilamauke: how did you get to know so much about perl (I admire that)
dondelelcarospaffum: right; then if (@array) {} or otherwise put array into scalar context
actionpeshalto lifts bottle, looks at it, shakes head at self
peshaltolifts bottle, looks at it, shakes head at self
maukeif (@array) # has elements
QtPlatypusspaffum: Lists and arrays are diffrent.
maukekalila: writing small scripts, reading perldocs, writing more silly scripts, reading more perldocs, ... :-)
spaffumdondelelcaro: oh if (@array) checks the count as scalar?
scrottieLook at nude pictures of Linus Torvalds...
Looking..
spaffumQtPlatypus: ok sorry I won;t call arrays lists anymore! :)
dondelelcarospaffum: if is scalar context, so yes.
maukeyes, if evaluates the condition in scalar context
spaffumok i thought I had to specifically coerce it to scalar
Khisanthsncln: we are usually not interested in helping people who are not interested in learning because that usually ends up being extremely frustrating
spaffummauke: understood - thanks guys
dondelelcarospaffum: nah; you can do it if you want, but it's just redundant.
ScribbleJAnd ... if he doesnt' want to learn, honestly, he shoudl drop the class. For real.
spaffumdondelelcaro: i see - i didn't realize if did stuff in scalar already
QtPlatypusCan I go? my $re = qr/something(.*)/;if ($data =~ $re) {print $1}; # And expect it to work reliably?
spaffumthanks folks you are always enlightening :)
maukeboolean context ISA scalar context
snclnkhisanth: Amar was asking for his girlfriend who has been morbidly ill for a week and unable to leave her bed and the assignment is due tomorrow. I know the assignment is neither your priority nor your problem.

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 93 

IrcArchive

NY Lost Funds