Or, if you want to do it as it comes in from the file,
$wc = 0;
while (<XMLFILE>) {
chomp;
s!\s*</?.+?/?>\s*!!g;
if (/\w/) { # quick sanity check for any non-whitespace character
@words = split /\s+/;
$wc += scalar @words;
}
}
Also, I could be wrong, but I'm...
Well, according to the documentation for that module, get_address returns ff:ff:ff:ff:ff:ff (your mac) if called in scalar context or (ff, ff, ff, ff, ff, ff) if called in list context. If you try to print it and don't see anything, you may want to check your $sMethod variable to see what...
one other thing i noticed, you're chomping after you separate your line! not sure where the space would come from though.
if all else fails, you may just have to resort to a good old
$field[3] =~ s/\s+$//
Brad Gunsalus
bardley90@hotmail.com
That may depend more on the comparison function you are using.
for example:
"23 " == 23 returns true, and 18 <= " 0 " returns false.
gt, ge, lt, le, eq, ne are the string comparators
>, >=, <, <=, =, != are the corresponding numeric comparators, which will do their best to convert...
well, you can do
for (reverse(1..5)) {
print "$_\n";
}
but I wouldn't do it for huge numbers of iterations.
That code actually creates the list (1, 2, 3, 4, 5), reverses it, then does the loop for each member of the list. Creating a long array is a bad idea; creating a long array and...
I would think the quick answer would be not to have the user hit the back button, but either provide a link back to the previous page or redirect them automatically. Either way, the form-handler page should be able to tell what div was visible by the input it gets (the radios), and it can pass...
Acutally, if you're really dedicated to building a bookmark to this page with your filters already active, you could try creating a local html page on your machine that contains the appropriate form variables and posts to his page. Then to view the page, simply open that local page (you can...
if all you want to do is list a count, then you might try a query that does that for you. Something like:
SELECT gall_sections.sec_id, count(*) as numalbs
FROM gall_sections, gall_albums
WHERE gall_sections.sec_id = gall_albums.sec_id
GROUP BY gall_sections.sec_id
Then you would just...
Is it possible/advisable to cause a linux system to reboot from inside a c++ program?
Are there other (perhaps more stable) methods of doing this?
Brad Gunsalus
bardley90@hotmail.com
Hey all,
I am not even remotely a DBA (this is a good thing, trust me), but I do end up "helping out" every once in a while.
My understanding of redo logs tells me that when you perform any insert/update/delete, it keeps a log of whatever data is inserted/updated/deleted so you can restore...
Was trying to avoid that (being beta and all), but I guess it's a better fit than messing with the other stuff that I don't need.
Thanks
Brad Gunsalus
bardley90@hotmail.com
All my code is hand-written in a text editor and I just need to have access to the xml-parsing classes.
Apparently, even though the xml classes are listed in the J2SE documentation, the corresponding classes are not available just by installing J2SE.
I saw on java.sun.com that they were...
Hey all. All the (simple) code I've seen for doing flyout (pulldown) menus uses an absolutely-positioned div section that displays when you mouseover, etc. But I have a slightly different situation.
I have a page with centered content on which I'd like to use these cool menus. However, I...
Isn't it funny how 5 minutes after you make a post you keep playing with it and find the answer?? haha
In case anyone is interested, the answer I found is:
onMouseOut="this.style.background = false"
That seems to clear out any background you previously assigned to that cell.
Brad...
Hey guys and gals.
I have a table with a really cool background image. Each row is a menu button. I already have the cells highlight onMouseOver, but I need to know how to get the cell back to transparent onMouseOut. I'm familiar with the standard onMouseOut="this.style.backgroundColor...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.