Posts
 
Reputation
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
Ranked #4K
~16.2K People Reached
About Me

Self taught and learning more every day. I started with Perl working for an ISP called Internet Direct, Inc in 1995. I've recently (sept 10 2010) started learning C#It reminds me a lot of LSL with the IntelliSense functions, makes it easy to pick up…

Interests
Perl C# PostgreSQL
PC Specs
Wow need to update more often:AMD Athlon(tm) II X2 235e Processor 2.70 Ghz6gb Ram, 750gb HD, Nvidia…
Favorite Tags
perl x 18

16 Posted Topics

Member Avatar for Erslich

Try this snippet: [code] private void Form1_MouseDown(object sender, MouseEventArgs e) { label1.Text = "Local position is " + e.X + ", " + e.Y + "."; label2.Text = "Global position is " + Cursor.Position.X + ", " + Cursor.Position.Y + "."; } [/code]

Member Avatar for gouthamarul
1
9K
Member Avatar for neoanomally

Since I just answered another question similar to this, I'd suggest using fork() depending on if it works on your OS or not (works fine on Linux/Unix and for me just now on Win7) Change: if ($time_difference > 180) { system("perl create_cache.pl"); } to: if ($time_difference > 180) { my …

Member Avatar for Taywin
0
130
Member Avatar for BTW8892

If you've named your table phonelist and your columns name and number, insert this at line 23: my $sth = $dbh->prepare("SELECT name,number from phonelist where name=?"); $sth->execute($name); my @row; At line 33, insert this: while (@row = $sth->fetchrow_array) {print "Found: Name=$row[0] Phone Number=$row[1]<br>\n";

Member Avatar for kordaff
0
193
Member Avatar for neoanomally

The child process gets a pid of 0, the parent process gets a new pid that is not equal to zero. You'll probably only want to run the exec once, in either the child process from fork, or in the parent. All the code after fork() runs in each process, …

Member Avatar for kordaff
0
1K
Member Avatar for nuwan

I like this bit from the Time::HiRes manpage [CODE] # Arm an interval timer to go off first at 10 seconds and # after that every 2.5 seconds, in process virtual time use Time::HiRes qw ( setitimer ITIMER_VIRTUAL time ); $SIG{VTALRM} = sub { print time, "\n" }; setitimer(ITIMER_VIRTUAL, 10, …

Member Avatar for richieking
0
2K
Member Avatar for mbob61

Attach your checkbox's CheckChanged event to the method below. [CODE] private void checkBox1_CheckedChanged(object sender, EventArgs e) { if (checkBox1.Checked) { this.Text = string.Empty; this.ControlBox = false; } else { this.Text = "Title On"; this.ControlBox = true; } } [/CODE] Kordaff

Member Avatar for kordaff
0
267
Member Avatar for 001

You can try this bit of code to get the output and errors into a scrollable Tk::Text window: [CODE] #!d:\perl\bin\perl.exe -w use strict; use Tk; use IPC::Open3; my $filename="perl myfile.pl"; # change me for a different file my $mw=Tk::MainWindow->new(); # makes a new Tk window my $button=$mw->Button(-text => "Run $filename", …

Member Avatar for MattEvans
0
682
Member Avatar for rharsha83

Net::Ping defaults to a tcp connection to the echo port (7 according to my /etc/services file). Use this (from the Net::Ping man page) example to do a regular ICMP ping like the command line: [CODE] use Net::Ping; my $p = Net::Ping->new('icmp'); print "$host is "; print "NOT " unless $p->ping($host, …

Member Avatar for Jayaprabhu
0
246
Member Avatar for nileshdalvi

I've put screenshots showing how i run a script called getmap.pl on my win98 machine: [url]http://plh.org/getmap.jpg[/url] for start/run window [url]http://plh.org/msdos.jpg[/url] for msdos window I added the die here line to stop all the debugging info from scrolling the command line off the screen =)

Member Avatar for raj_mangoli
0
196
Member Avatar for scotchfx

I see a couple problems with this script (besides it grabbing over 1025MB of memory when i ran it under linux, which it didn't do under windows) First, you should always use this line at the top of your perl program: [CODE]use strict;[/CODE] Fix all the warnings this will produce. …

Member Avatar for andrew23chan
0
168
Member Avatar for 001

Myself, I'd use perltk. The Tk module comes with activestate's version, so portability to windows, if required, is less of an issue. The usenet group comp.lang.perl.tk is helpful. The O'Reilly book 'Mastering Perl/Tk' also has a great deal of helpful information. The man pages are what I usually refer to …

Member Avatar for kordaff
0
111
Member Avatar for nanosani

In perl, this works for non-numeric scalar variables too: [CODE] #!/usr/bin/perl $a="abcd"; $b="yyyyyy"; $a ^= $b; $b ^= $a; $a ^= $b; print "$a $b\n"; [/CODE] To swap arrays, I cannot think of a way off hand without using a counter variable to iterate through the larger array... Kordaff

Member Avatar for Daishi
0
316
Member Avatar for nileshdalvi

I tried it on my win98 machine. The MSI version kept hanging at the making html step. Extracted the AS version to D:\ActivePerl-5.8.7-813-MSWin32-x86-148120\ActivePerl-5.8.7-813-MSWin32-x86-148120\ using winrar (like that better as it does rar, zip, tar, gz, etc) I would have been happy with D:\Perl but oh well lol. Cd'd into that …

Member Avatar for kordaff
0
214
Member Avatar for nileshdalvi

I believe the installer.bat file (a perl script) does a lot of file path renaming in various scripts in the perl installation. Using perl without running installer.bat is problematic. You also may need to specify the full path for myfile.pl unless it is in your current directory (while in a …

Member Avatar for Comatose
0
190
Member Avatar for optomystique

Here's a bit of code that prints the multi-line error message from that log sample: [code] #!/usr/bin/perl -w use strict; my $log="log"; my $partial=""; my $state=1; if ( $ARGV[0] ) { $log=$ARGV[0] } open ( FILE,$log ) or die "Failed to open $log:$!\n"; while ( <FILE> ) { if ( …

Member Avatar for kordaff
0
413
Member Avatar for nathanpacker

Not that it's necessary to change something that works (believing this may be a perl sin, so i'll say a perl prayer later...) but you can change those two lines into one and eliminate the extra variable: $FORM{'story'} =~ s/\n/<BR>/gi; Kordaff

Member Avatar for kordaff
0
248

The End.