#perl - Thu 1 Mar 2007 between 05:33 and 02:26



bpalmerTipTap: the "lock" doesn't refer to the kernel doing anything to the thread; it's a flag to make sure that only one thread at a time can be doing something
(think of it as a lock on a bathroom door; if everybody going into the bathroom immediately closes and locks the door on entrance, only one person can be using the bathroom at the same time)
TipTapi see
actionCPAN upload: XML-MyXML-0.08 (+++ ) by KARJALA
CPANupload: XML-MyXML-0.08 (+++ ) by KARJALA
TipTapi thought it was the kernel that performed lock
bpalmerThere are two ways to try to get into the bathroom: you can sit outside and keep trying to open the door, until eventually it succeeds ; this is the spinlock scenario
SubStackrabeldable: or open $fhs[$i++], "<", "baz.quux"
bpalmeror you can just yell at the person inside to let you know when they're out
SubStackor toss the opens in their own lexical blocks
TipTapahh i understand, thanks
SubStackdepending on what you need
GumbyBRAIN: kernel hook stuck in my finger
GumbyBRAINYou can let the sun nothing less is required to hook in the name stuck.
rabeldablehey SubStack, thanks
what I'm trying to do is open a file for reading
sometimes the file that I open has some reference to another file that needs to be opened and read as well, there is a possibility that I could be opening a few files in one loop iteration
SubStacka loop or recursion?
rabeldablein a loop that reads each line, if the line has a path to a file on the local filesystem the file is also opened
all lines that are read that do not match a local file are printed to STDOUT
SubStacklike #include ?
rabeldableyes
exactly
SubStacksub foo { open my $fh, "<", shift; while(<$fh>){ chomp; -e ? foo($_) : print "$_\n" } close $fh; } foo("start_file.foo")
rabeldableSubStack: how does that not close the $fh filehandle ?
do I assign a value to $fh somewhere ?
SubStackit's assigned in the open
$fh is unique to each call
rabeldableoh... special perl internal value
SubStackit's just a regular scalar
rabeldablethats just what I was looking for
thank you
SubStack(satisfied customers)++
rabeldablealways!
Teratogenhmm, the original website for Robert's Perl Tutorial is offline
jpegGumbyBRAIN: beginning perl.
GumbyBRAINDoes this mean that my thing tha propagates my updates, without having to spend a significant difference between #perlhelp and #perl will be perl or not.
jpegI'm sure that made sense to him.
guest1234just wanted to ask if i can have a symbolic reference to a standard routine, like system()?
btw, hi all :)
i know i can reference a user-defined sub

Page: 4 11 18 25 32 39 46 53 60 67 74 81 88 

IrcArchive