2,452 Topics
![]() | |
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 … | |
how to compare two directories that contain xml files in perl.. and prints the content that is modified, added and deleted | |
[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 … | |
![]() | 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 … |
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 | |
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 … | |
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 … | |
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 = … | |
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 … | |
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............ ![]() | |
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 … | |
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 … | |
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? | |
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: … | |
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 … | |
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 … | |
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 | |
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, … | |
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. … | |
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 … | |
Hello, I'm trying to simply do a SELECT from an ODBC source. It works perfectly in PHP but not in perl ! Therefore there is no problem at source or at ODBC level, it seems to reside at perl/DBI level... What I do : [CODE] use DBI; $dbh = DBI->connect('dbi:ODBC:' … | |
Hello, some help here.. I have a gridview, at my home page, binded to a dataset. On the first column is a hyperlink, on which, if click it will go to another, page, Viewer Page, and passes the data to display on the other page pls advise, preferably in c#.. … | |
At the moment I'm busy updating a number of modules for perl on one of our servers, but I'm experiencing some problems with the Mail::SPF::Query module. Most of the subtests fail right now, but I can't find out why. Anyone has a clue? Below is the output of "make test" … | |
Hi I have a short script :(see below) My problem is on the system lines syntax it doesnt do what I expect. Instead of running the bb command send as status dbr-cmrm06.us.ensrv.mgmt.bmc and then cat to the history_test file and send the content to the hobbit server it prints the … | |
use warnings; use strict; open (TEXT_FILE,'C:\Documents and Settings\rnjenga\sawa3.txt'); my ($line, $nextline); while ($line = <TEXT_FILE>) { if ($line =~ /FT\s*\Wnote.+\w+:/){ $nextline = <TEXT_FILE> ; print ("$line $nextline \n"); } if ($line =~ /FT\s*\Wnote.+none/){ $nextline = <TEXT_FILE> ; print ("$line $nextline \n"); } } close (TEXT_FILE); I have written the above … | |
hi everybody, i need some help, I am stuck on a problem for too long. I have a decimal number (big Int), very big, (246 cypher). I need to convert this number to a 96byte char. I cannot understand how. I have already read and tried pack/unpack, but i can't … | |
I am trying to accurately calculate percentages with perl. The problem is of course that percentages don't end up as nice, even whole numbers...and I want to truncate those number (92.38495%) to the whole number accurately reflecting the percentage (92%). Using "($value/$total)*100" gives the percentages, then I used "$value=int($value+0.5)" to … | |
The following code: Exits immediately and produces the message below when search pattern "[COLOR="Green"]\b\w+{3}\b[/COLOR]" is entered: [code=perl] #!/usr/bin/perl -w #matchtest1.pl use strict; my($pattern); my($true); $_ = '1: A silly sentence (495,a) *BUT* one which will be useful. (3)'; do { print "Enter a regular expression: "; chomp($pattern = <STDIN>); if … | |
Hello all. I have a small problem. I have a crewler, that gets into one website and extract some info from it, and writes the exctracted content to file. The only prob, that in 3~4hours of work, thise script uses 1 gig of ram. [code]for(my $increment = 1; $increment <= … | |
I am reading the book "Beginning Perl" by James Lee and have been pretty happy with the content so far. That said I am stuck on chpt 7 which deals with regular expressions - I can't get the backreferences to work even when I copy the source verbatim. source: [COLOR="Green"] … | |
I have been using this code: [code="perl"] while (($key, $value) = each (%hash)) [/code] To iterate through a hash. However, the order of the keys that it retrieves are exactly the same each time i run the script. I looked to google for answers and found the following [URL="http://www.nntp.perl.org/group/perl.perl5.porters/2008/06/msg137802.html"]bug report[/URL]. … | |
Hi Guys, I'm working on a form and was wondering if this is the simplest/only way to clear input text on a form and have it come back if the field is left blank. [CODE]<p> Name: <input type="text" value="First Name" name="fname" onfocus="if(this.value == 'First Name'){this.value=''};" onblur="if(this.value==''){this.value='First Name'};"/> <input type="text" value="Last … | |
Hi - Looking for perl scripts for checking reciprocal links e-mail ami-at-transcendevelopment dot com Thanks! SNIP | |
Hi, friends i have a datagrid bound a hypercolumn [CODE=ASPNET] <asp:DataGrid ID="menu" AutoGenerateColumns="False" Runat="server"> <Columns> <asp:HyperLinkColumn DataTextField="OPT_DESC" DataNavigateUrlField="OPT_LINK" DataNavigateUrlFormatString="{0}"/> </Columns> </asp:DataGrid> [/CODE] basically what i want to do is, that i want to insert into the database the users that click some links. so how can i make a clickevent … | |
Hello I was wondering if there is a way to read a unix profile'd variable while inside my PERL code? I'm trying to do something like this. system( " execute some code >> $UNIXVAR\log"); also tried system( " execute some code >> '$UNIXVAR\log'"); I think though that the way I'm … | |
Hello, I am facing the a probelm, I wanted to read a unix PATH variable into perl script. But its not working. $path_var=`$PATH`; Can u help me in doing this. Thanks in advance, Subii | |
Hello - I'm trying to use Perl to run through a list of numbered folders (41..61) that have a txt file in each with a name like "ms_stem41" or "ms_stem10B.pl". I am grepping a line from these files then manipulating them. The files all start with "ms_stem". When I type … | |
Hi How do we install the CPAN packages, like CGI-XMLForm-0.10 in the linux system. I basically have idea of ppm through which we install in windows system ... but no idea about linux ... hw do we do it in linux. if we have to use the tar file which … | |
Hi, I have a URL like this: [code] $url="http://www.somesite.com"; [/code] I have to connect to this URL and download the data. Sometimes there will be problem in that particular site. So I have to reconnect and then again download the data. Here is the code to connect online. [code] #!/usr/bin/perl … | |
Brand Newbie to perl. Playing around trying to get a feel for how arrays work and encountered error in title. [COLOR="Green"]#!/usr/bin/perl -w use strict; my(@array) = (10, 20, 30, 40, 50, 60); my($marker); my($EOA) = @array; for ($marker = 0; $marker <= $EOA ; $marker++){ print "@array[$marker]\n"; #line where error … | |
I have a web site that I built using HTML and CSS. I uploaded the site to the server and it works great except for the add to cart button. I took the site down and put the old one back up because the shopping cart is not working. The … | |
Hi If i add the try block it says syntex error at initlialization of for loop . Non -working code ... #!/usr/bin/perl -w use strict; try { print " 11111111111 "; } catch { print " 2222222222 "; } for (my $i = 0 ; $i < 5; $i++) { … | |
I would like to enable users to view the contents of a zip file via CGI interface. I have tinkered around with Archive::Zip, Archive::Zip::MemberRead, and Archive::Extract, and can't seem to figure out a way to work. After perusing the net for a solution to this, it seems that perhaps the … | |
I want to create a button which when clicked, open a targeted page in new window...... Please please please help.... | |
Two days back I had purchased D-Link-Xtreme N™ Dual Band USB Adapter (DWA-160). This purchase was made with a big expectation i.e the manufacturer(Dlink) says its feature is [B]"DELIVERS FASTER SPEEDS AND FURTHER RANGE THAN 802.11g SO YOU GET STRONG SIGNALS FROM VIRTUALLY EVERY CORNER OF YOUR HOME"[/B] but unfortunately … | |
Two days back I had purchased D-Link-Xtreme N™ Dual Band USB Adapter (DWA-160). This purchase was made with a big expectation but unfortunately it happened to give the same result of my Acer Notebook’s built in Adapter (Atheros AR5007EG Wireless Network Adapter), which is terribly low. I use D-Link-DSL-2740B RangeBooster … | |
FT CDS complement(join ( 14006...14068, 19351..20068)) FT /locus_tag= TP01_0004” FT /note=”go function: nutrient reservoir activity [goid FT 0045889] The above statement is been read as a string and I would a REGEX as follows: /^FT \s CDS \s \ / complement[0-9]/ # search line 1 /^FT \s .* \ / … | |
Hi, I have a CLI application and when the user enters the password, I would not like it to be shown on the command line. Is there a way to do that in Perl on Linux? Thanks. | |
I'm trying to figure out how to get results from a database query to be displayed on a listed page and if the user wants to know more about the results they will click one of the dynamically generated items that is hyperlinked. This will then bring the user to … | |
I have inherited a script here that churns out 3 tidy folders for creating user nt profiles, user folders, and also user mail accounts. It is now no longer working. I had created a new administrative login on the Mac station where BB edit is being used. I can run … ![]() |
The End.