190 Posted Topics

Member Avatar for Mushy-pea

Hello everyone. I need to write a Bash script to remove blocks of text from a given file. The idea is, the text to be removed will be marked by appearing between certain delimiter characters i.e. [code] Here's some text and ~this bit gets removed~, where tilda is the delimiter. …

Member Avatar for kuom
0
108
Member Avatar for Mushy-pea

Hello everyone. I'm still working on that forum system I mentioned a bit ago (perlBB). Hopefully it'll be ready for Christmas :p . However, I ran into a strange problem while I was re-writing parts the two functions below. [code=perl]sub enter_post { my(@field, $input, $offset1, $offset2, $n, $name, $field_length, $flag_guest, …

Member Avatar for swampyankee
0
86
Member Avatar for Mushy-pea

Hello everyone. I've got the stuff working I talked about here ( [url]http://www.daniweb.com/techtalkforums/thread68292.html[/url] ). Now, I am working on this problem; I need to check if a cookie is present on the client machine. It's presense will indicate the user is logged in. If it is there I need to …

0
76
Member Avatar for Mushy-pea

Hello everyone. Is it allowed to have a "use" statement inside an eval that is compiled separately to the enclosing program (i.e. eval EXPR, not eval BLOCK). The reason I want to do this is, I have modules of code that I don't want to be compiled every time my …

Member Avatar for MattEvans
0
140
Member Avatar for Mushy-pea

Hello everyone. I am currently working on the HTML / Javascript front end of a web forum system (perlBB). I have a couple of questions that would I would like to ask. 1. Is the way to include an external javascript file in a page like this? [code=HTML] <head> <link …

Member Avatar for Mushy-pea
0
276
Member Avatar for Sarah Lee

From what you say, it sounds like your stored proceedure is a server side script that returns some stored information about a user's preferences when the user logs in. If this is so I would advise the following. Get the stored proceedure to serve a page with a script in …

Member Avatar for Mushy-pea
0
104
Member Avatar for Mushy-pea

I was wondering whether anyone else has experienced this. When a script I am working on got above a certain size, the line numbers quoted in the compile and run time error messages started to be inaccurate. The line numbers now seem to always be before where the error actually …

Member Avatar for Dukane
0
69
Member Avatar for Mushy-pea

Hello everyone. If you live in the UK and you watch the news this will not need explaining to you. But....that rubbish reality TV show Big Brother on C4 has caused a diplomatic crisis. Why? Jade Goody has been bullying the **** out of Bollywood star Shilpa Shetty (using the …

Member Avatar for jbennet
0
208
Member Avatar for jemather

I think what might be wrong here is that Perl treats both single and double quotes as string terminators, whether you started the string with a single or double quote. My advice is try escaping the single quotes in your string with back slashes ( \ ). So the line …

Member Avatar for KevinADC
0
98
Member Avatar for Mushy-pea

Hello everyone. I decided to try out XAMPP ( [url]http://www.apachefriends.org/en/xampp[/url] ), which contains a pre configured distribution of Apache 2.2.3. My intention is to use it for some local testing of a web application that uses Perl scripts. I got Apache running easily enough and it runs the sample Perl …

Member Avatar for mangokun
0
194
Member Avatar for amitbhat

[QUOTE=MattEvans;302170]No. Why don't [B]you[/B] plan out how to do your homework problem, work out the answer, and reply [B]me [/B]with the solution; Now.[/QUOTE] :lol: The solution may lie in the field of "scale free networks" rather than Chinese postmen. If you have a specific question about a coding problem there …

Member Avatar for MattEvans
0
159
Member Avatar for ultranet

If someone does pay over the odds to one of these so called domain squatters, its their own fault. A company having a good sounding address for their website can't make up for good business management. Also, some domain suffixes have restrictions imposed on them by the DNS database maintainer, …

Member Avatar for Mushy-pea
0
198
Member Avatar for Mushy-pea

Hello everyone. I'm working on getting threads of replies to work in my forum system. I'm using this function: [code=perl] sub read_fields { my($offset1, $offset2, $offset3, $offset4, $this_offset, $result, $n, $dbase, $data, @field_name, @name_length, $num_fields, $m, $check, $check2, $primary_key, $action, @passed_array); ($offset1, $offset2, $result, $dbase, $num_fields, $m, $action, $primary_key, @passed_array) …

0
63
Member Avatar for aetinti

You might be able to do this using the IPC tools built into Perl. This page describes how to open a child process and connect pipes to it's standard input and output: [url]http://perldoc.perl.org/IPC/Open2.html[/url] You can find more in depth information on interprocess communication in Perl here: [url]http://perldoc.perl.org/perlipc.html[/url] Steven.

Member Avatar for aetinti
0
83
Member Avatar for vjw757

What, what? Am I missing somthing here? :confused: . Maybe you're talking about someone with a similar name. Steven.

Member Avatar for ~s.o.s~
0
78
Member Avatar for Mushy-pea

Hello everyone. I read a couple of tutorials on x86 assembly a while ago. It was made clear in these that certain instructions need to be included at the end of a program to make it close properly. However, there was some inconsistency about how a program should be terminated. …

Member Avatar for Purple Avenger
0
113
Member Avatar for mattyd

Now, take a look at an alternative view point: [url]http://www.pbm.com/~lindahl/real.programmers.html[/url] Steven.

Member Avatar for mattyd
0
53
Member Avatar for purple rainx

[QUOTE=jbennet;283222]i know its wierd but my cousin (shes female) always makes herself male when shes setting up profiles for forums as it means she gets chatted up less by desperate guys[/QUOTE] I've believed I was desperate at times, but I see now I wasn't that bad on the scale of …

Member Avatar for Chaky
0
698
Member Avatar for Mushy-pea

Hello everyone. I was just wondering if it is OK to do this: [code=perl] if ($beer == $wine) {# Some code} elsif ($beer == $vodka) {} else {die("Oh dear! Neither condition satisfied!")} [/code] i.e. have an empty block attached to an if, elsif or else. It might sound like an …

Member Avatar for zabina
0
217
Member Avatar for Erich K

Hello. Here is me just after graduating from Surrey. It's about a year old. Steven. EDIT: oops....Scaling this image down has made my eyes look allweird and squinty.

Member Avatar for Extremist
0
729
Member Avatar for jan1024188

There are some applications whose developers claim can (in some cases) retrieve a C - like representation of the original source from a .exe file. It is generally believed that reverse compilation of 3rd level languages is difficult bacause there may not always be a one to one mapping between …

Member Avatar for John A
0
141
Member Avatar for Mushy-pea

Hello everyone. Has anyone heard of Sigur Ros (the band from Iceland)? I got their last album for Christmas and its A - mazing :p . They even invented their own language to sing on the songs. If you don't have a clue who I'm talking about, think of the …

Member Avatar for pty
0
31
Member Avatar for The Dude

I found this: [url]http://www.mushypea.co.uk/images/mushypea.gif[/url] Interestingly, I've just registered a domain in my name with a very similar URL. Be assured I'll be back to SPAM the Lounge with info about it soon (in a nice way :p ). Steven.

Member Avatar for ~s.o.s~
0
141
Member Avatar for Mushy-pea

Hello everyone. I always run Perl scripts on a web server with [code] #!/usr/bin/perl -T [/code] at the top (i.e. taint mode on). I try to do the same when testing scripts on my local machine and this often works fine. But somtimes (when running from the command line) I …

Member Avatar for KevinADC
0
91
Member Avatar for Mushy-pea

Hello everyone. I had an idea for an encryption system based on irrational numbers a while ago and wrote down a rough specification. It is basically like this: 1. Decide on an irrational number to define the encryption, e.g. pie, e or an irrational n root of a number. It …

Member Avatar for Rashakil Fol
0
64
Member Avatar for Dani

Well, I saw the new year in in Bristol with a primal scream. I was in a pub garden with my sister (and loads of others, obviously) and some guy we knew started screaming "aaarrrhhh....". Soon others joined in and it built up until it was like "AAAARRRRHHHH!?!?...." :p :p …

Member Avatar for BamaStangGuy
0
396
Member Avatar for Mushy-pea

Hello everyone. I read ~S.O.S.~'s signature today and it reminded me of somthing. The essence of it was a claim that you can't doubt logic or perception. About a year ago I had some experiences that brought logic and perception into direct conflict. These experiences might be called "daylight hallucinations" …

Member Avatar for Mushy-pea
0
149
Member Avatar for mattyd

Its a sad and perhaps little known story that two of the greatest mathematicians of the last century died in tragic circumstances. Alan Turing (as the "homepage" states) killed himself with a cyanide laced apple. This is perhaps because, having made ample use of his code breaking work during the …

Member Avatar for Mushy-pea
0
38
Member Avatar for Jessehk

In Sinclair Spectrum 64 K BASIC: [code]for n = 1 to 10 print n next n [/code]

Member Avatar for Maidomax
0
991
Member Avatar for The Dude

I love the way Bruce Willis always starts off with a clean white T-shirt in those films, then it gradually gets more torn and covered in blood and dirt as the film progresses. Correct me if I'm wrong, but haven't there already been four Die Hard films (Die Hard with …

Member Avatar for The Dude
0
36
Member Avatar for Mushy-pea

Hello everyone. I've been working on a web application (written in Perl) called perlBB for about 11 weeks ( [url]http://sourceforge.net/projects/perlbb[/url] ). I'm getting close to finishing an early version. However, suitable testing methods have become a bit of an "issue" for me on this project. So far I've been testing …

Member Avatar for MattEvans
0
329
Member Avatar for mattyd

[QUOTE=Ancient Dragon;286879]I suspect there are billions of planets in the universe that have water. We earthlins are probably not alone.[/QUOTE] I suspect you are correct. But consider this; if the universe is spatially infinite and (on large distance scales) of uniform density, intuition suggests that there are an infinite number …

Member Avatar for 'Stein
0
213
Member Avatar for Mushy-pea

Hello everyone. If you're a regular Perl user you might already know this; the developers of Perl 6 are using a prototype version of the Perl 6 interpreter written in Haskell to do various "proof of principle" testing. It's called Pugs (maybe a pun on the Haskell interpreter Hugs). However, …

Member Avatar for KevinADC
0
90
Member Avatar for Mushy-pea

Hello everyone. I am getting close to completing an early version of my open source forum system perlBB ([url]http://sourceforge.net/projects/perlbb)[/url]. I was wondering if someone could give me some advice about distribution of code between modules. In the scenario that the perl scripts in my system are run non - persistantly …

0
33
Member Avatar for Mushy-pea

Hello everyone. Does anyone know why Unix developers seem to have an obsession with the words foo and bar? Anyone who has read many Unix manual pages or the official Perl documentation will know what I mean. They appear as example variable or parameter names all over the place! Maybe …

Member Avatar for Infarction
0
108
Member Avatar for Mushy-pea

Hello everyone. I'm sure a few people around here have played a few computer games. But how many cheats do you know? To set the ball rolling I'll list my favourite ever cheat first: Game: Star Wars Knights of the Old Republic (Xbox) What: Turn Zalbar the Wookie into a …

Member Avatar for Ancient Dragon
0
71
Member Avatar for purple rainx

Hmmm, I decided to leave Daniweb once. But look at me now, still posting away :p . Guess I'll be staying then. So, I don't think you'll be getting away that easily Justine :) . Hope to hear from you soon. Steven.

Member Avatar for Junyah
0
98
Member Avatar for jaguar founder

You don't need to deal with ports or FTP to do this. What you require can be done with a form on your website and a Perl script to process the form on the server. There may be open source scripts that can fill your requirements already out there (try …

Member Avatar for jaguar founder
0
118
Member Avatar for Mushy-pea

Hello everyone. Which of these do you prefer? As people who know me would agree, I'm a bit of a depressive ******* somtimes :sad: . So, obviously I'm voting for the Chronicles (which for the uninitiated, is one of the darkest fantasy series' ever written). I do really like the …

Member Avatar for jwenting
0
93
Member Avatar for Mushy-pea

Hello everyone. I was writing somthing in C++ today and a little "issue" occured to me. How can you avoid the possibility of a buffer overrun when reading from STDIN into a character array? In this simple example [code]#include <iostream> using namespace std; int main () { char *some_text = …

Member Avatar for Salem
0
100
Member Avatar for jd_1604
Re: Lost

Please post some of the code you have be unable to compile and the compile errors you have been getting. Then someone might be able to help. Steven.

Member Avatar for jd_1604
0
115
Member Avatar for mahe4us

Tutorials are good for learning the basics of a language. However, if you want a reference resource where you can look up a manual page on any keyword (with some tutorials thrown in as well) try out [url]http://perldoc.perl.org[/url] They've got a particularly good tutorial on regular expressions here [url]http://perldoc.perl.org/perlretut.html[/url] I …

Member Avatar for Puckdropper
0
163
Member Avatar for Mushy-pea

Hello everyone. I would imagine a fair few people who hang around in this forum have done or are doing computing related degrees. I was just wondering, do computer science / related degrees these days contain material on upcoming new computing technologies like quantum computing and biological computing? You can …

Member Avatar for Rashakil Fol
0
111
Member Avatar for mattyd

Insomnia by Faithless: [code] I only smoke weed when I need to And I need to get some rest yo Where's the sense? And I confess I burned a hole in the matress, YES, YES It was me I feel guilty And at the count of three I pull back …

Member Avatar for mattyd
0
249
Member Avatar for Mushy-pea

Hello everyone. I've been using my parents computer for a while to do various usefull stuff. It has Windows 98 SE and has been on broadband with no virus scanner or firewall for months. Before that it was on dial up for years with no protection. Thankfully it's still going …

Member Avatar for Xpenetrator
0
136
Member Avatar for Little E

To make a Perl script display a page you have already created, do this: [code=perl] open(file1, "thanks.html"); @data = <file1>; close(file1); $page = join("", @data); print "Content-type: text/html\n\n$page"; [/code] Just make sure your thanks page has a link for the user to get back to the rest of your site. …

Member Avatar for Mushy-pea
0
113
Member Avatar for Mushy-pea

Hello everyone. I recently came accross the concept of Turing completeness (in languages). I was wondering, is there a general method for determining if a language is Turing complete? Or is it one of those intuitive things where you just have to look at it for a while and go …

Member Avatar for Rashakil Fol
0
91
Member Avatar for Mushy-pea

Hello everyone. I've run into a problem with regular expressions; the extraction "variables" ($1, $2, $3 etc.) are read only and scoped to the current block. If you need to do two regex extraction operations in the same block, is there a way to reset the ($1, $2, $3 etc.) …

Member Avatar for Mushy-pea
0
141
Member Avatar for jread

I did Physics at university and the course included some numerical modelling work. Guess what language we were given to learn first....Fortran. It has some neat features, like having loads of fancy mathematical functions built into the core of the language. Since learning about other languages I've realised it's not …

Member Avatar for Mushy-pea
0
327
Member Avatar for Mushy-pea

Hello everyone. I've tried several times to use associative arrays in my Perl scripts, but each time I have got syntax errors I can't understand. Based on the tutorials I've read I have tried to do things like this: [code=perl]sub test_function { my($key, %table); %table = ('word1', 'Perl', 'word2', 'is', …

Member Avatar for Mushy-pea
0
111

The End.