2,452 Topics

Member Avatar for
Member Avatar for MattEvans

Ever wanted to evaluate a user-provided expression, maybe from a form input or otherwise, and return the result? eval($expr) is dangerous because eval(open $out, "> file.what"); will open the file, infact, eval(everything) will pretty much do everything. checking though everything is tedious, and manually parsing everything seems like a waste …

Member Avatar for KevinADC
0
390
Member Avatar for kalyanraj
Member Avatar for KevinADC

Given the date in mm-dd-yyyy (or M-D-YYYY) format (or any combination of that format) you can find out what day of the week that was on or is on or will be on, within the limitations of the system the script resides on. This snippet uses only core functions and …

1
1K
Member Avatar for Mushy-pea

This is my first working perl script that does anything useful; that being to count the hits made on a web page and display the count graphically. To make the counter work on your web page (should you wish to), you will need to create images for the number tiles …

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

Use the List::Util module. I believe List::Util is a core module starting with perl 5.8. For older versions of perl you may need to install the module. See the module documentation for more details: [URL="http://perldoc.perl.org/List/Util.html"]List::Util[/URL]

0
164
Member Avatar for KevinADC

I've seen this question (or similar) asked many times on forums: I have a variable in a file (text) and want to expand it. For example, I have this line in a text file: Mary had a little $lamb and I want to be able to expand $lamb but text …

0
272
Member Avatar for KevinADC

"How can I find all the permutations of a list (or a word)"? I have seen this question asked a number of times on forums. There is a module that makes this task very easy: List::Permutor. It is not a core module so you may need to install it. See …

0
171
Member Avatar for KevinADC

You will need to install the Email::Valid module if it's not already installed. See the module documentation for further details. [URL="http://search.cpan.org/~rjbs/Email-Valid-0.176/lib/Email/Valid.pm"]Email::Valid[/URL]

0
292
Member Avatar for KevinADC

The [URL="http://perldoc.perl.org/File/Basename.html"]File::Basename[/URL] module is used to parse file paths into directory, filename and suffix (or file extension). My simple example shows how to get just the file extensions.

0
878
Member Avatar for MikeDexter

Hi, I have written a small script that takes an infile, slurps it into an array, and makes a change to the file. Well that is my intention.... I can get the changes to be made using Regular Expressions because I can print and see my H1 tags are changed …

Member Avatar for MikeDexter
-1
159
Member Avatar for prajnapj

how to compare two directories that contain xml files in perl.. and prints the content that is modified, added and deleted

Member Avatar for gginnj
-1
93
Member Avatar for gginnj

[code] #!/usr/local/bin/perl use IO::Socket; my $url = 'localhost'; my $port = 6464; my $error = 1; my $sock ; while ($error) { my $sock = new IO::Socket::INET ( LocalHost => $url, LocalPort => $port, Proto => 'tcp', Listen => 1, Reuse => 1 ); $error = 0 ; $error =1 …

Member Avatar for gginnj
-1
200
Member Avatar for perlguy

I'm trying to cut off the text leading up to the whitespace past the >. For example the string is 'Web & Programming > Testing & QA Contractor' and my regex is [icode]$job->{'title'} =~ s/^.+>\s+//;[/icode] I need to end up with just 'Testing & QA Contractor'. Can someone point me …

Member Avatar for Amps
-1
74
Member Avatar for Gadfly_1943

I am trying to copy a list of email addresses in Excel and paste them into SQL. I am using Navicat. I am able to paste the text, but I lose the hyperlink format. What can I do? Obviously, I new at this. Any help would be appreciated. Thanks...Gadfly_1943

Member Avatar for pritaeas
0
81
Member Avatar for xiikryssiix

hello everyone... i wrote a basic program for my C++ class that includes SUMs and while loops. its fairly self explanatory, but i am not getting the correct SUMs for my outputs. apparently, i am missing something extremely important somewhere here. can someone take a look and give me a …

Member Avatar for xiikryssiix
0
244
Member Avatar for DemonixXV2

I'm trying to find or create a Perl script that: Checks for and creates these files: notes notes.1 notes.2 notes.3 notes.4 The first represents the current log file and the others are older versions. Each time the script runs it would check for the existence of notes.3 and, if it …

Member Avatar for DemonixXV2
-1
155
Member Avatar for rayken1

kindly help me to get out the error of " Use of uninitialized Value $_ in substitution. my code is..... #!/usr/bin/perl use warnings; use strict; open (TEXT_FILE1,'C:\Documents and Settings\rnjenga\Muguga.embl'); # open file for reading my ($line1, $nextline1 ,$line2,$newline ); my ($find1, $find2); #Get required line from file while ($line1 = …

Member Avatar for wickedxter
-1
135
Member Avatar for sanushks

Hi, I'm running a Perl script as a service which moves files from a particular source directory to the target directory in Windows server 2003 . It polls the source directory and runs in an infinite loop. The service hangs and perl script does not move files from source to …

Member Avatar for KevinADC
-1
242
Member Avatar for Prakash_8111

Hey Guys, Have u any Idea how to call a perl script within my main script in a loop. I used system and exec both, but it seems to be not working. I want the second calling of the script shouldn't depend on the first calling.... all should run independently............

Member Avatar for onaclov2000
-1
138
Member Avatar for LSU_223

hello - i am trying to take a text file with multiple sets of numbered lines and sort each set, leaving the non-numbered text in place. i can't seem to figure out how to loop over the regular text, save then sort the numbered text, then move on. i want …

Member Avatar for KevinADC
-1
125
Member Avatar for samaru

This book is excellent: [b]Sams Teach Yourself Shell Programming in 24 Hours (2nd Edition)[/b] [url]http://www.amazon.com/exec/obidos/ASIN/0672323583/qid=1034404576/sr=2-3/ref=sr_2_3/102-8089820-6681729[/url] It received good reviews. Here's my personal review from Amazon.com: This is probably one of the best books by Sams that I've read. If you want to start shell programming, you've picked up the perfect …

Member Avatar for jenn11
-1
467
Member Avatar for FrankQC

I want to make it so that in the terminal (where the post-execution occurs), the input is at the bottom of it, rather than at the top. Does anyone know how to do this?

-1
39
Member Avatar for jmh185

Can anyone help with this... Google is being very strange, won't let me log into iGoogle, all links opened redirect me to yahoo.de unless i 'open in new tab', overall just not working very well. My log: Logfile of Trend Micro HijackThis v2.0.2 Scan saved at 15:19:36, on 15/08/2009 Platform: …

Member Avatar for jmh185
0
271
Member Avatar for agent154

I don't get this.. I was able to use it the other day without issue, but now when I use it, the "message" that I put into the paramater doesn't get printed out to the console, and I get an error box saying "Program has stopped working. Windows is checking …

Member Avatar for agent154
0
155
Member Avatar for dipsn

I am new to perl and want to migrate VSS to SVN. I have searched for tools and codes but they are bit difficult can anyone please suggest some easy way or perl script or any link that will help me?? Its urgent please reply as soon as possible. thanks …

-1
53
Member Avatar for salmax2005_dw

Ajax control is not wroking fine.It is displaying partically and its behaviour is also totally different and not upto its usualy standard.Cud anyone plz give me some solution to solve this problem.urgenttttttttttttttt regards saleem

0
43
Member Avatar for pbpyrojust

So guys... everything is working properly except for when the radio button is clicked to either "yes" or "no" on the form the email that is send does not display it at all. [code] $message = " $todayis [PST] \n Attention: Interactive Media Requesting a Bid \n Phone Number: $areacode2, …

Member Avatar for pbpyrojust
0
72
Member Avatar for Acegikmo

I have a Player class, a Weapon class and a Projectile class in my applet game. The weapon class uses Projectile objects when fired. For example, everytime I click I want this code to execute: [CODE]projectileList.add( player.weapon.fire() );[/CODE] player.weapon.fire() returns one or more projectiles that the projectileList handles every frame. …

Member Avatar for Acegikmo
0
164
Member Avatar for JayT

Hi, I've been reading through some tutorials on creating a basic web upload script with perl and cgi. The problem is that my server keeps throwing an Internal Server Error 500 without giving any feedback. I am hoping that someone has run into a similar problem or there is an …

Member Avatar for bildja
0
215

The End.