1,633 Topics
| |
Hi , use Sort::External; $output = '1.txt'; open(FILE, $output); my $sortex = Sort::External->new( mem_threshold => 1024**2 * 1024 ); while (<FILE>) { $sortex->feed($_); # tried to change it to ~$_ but did not work !!!!! } use Fcntl; $sortex->finish( outfile => 'desc_1.txt', # comes in ascending order !! flags => … | |
Hi, I am new here and to Perl. I am currently being driven mad trying to install an event calendar script, I have created the database and successfully created the tables by running the dump.pl file but when trying to run the admin.pl [url]http://www.mysite.co.uk/cgi-bin/links/admin/admin.pl[/url] I get the following error - … | |
[CODE]Hi All,Im a newbie in Perl Coding,and i just cant get this to work it says error compiling[/CODE] This is an Exploit for Hacking Joomla com_cinema Heres the Code [CODE]#!/usr/bin/perl -w #Joomla Component Cinema 1.0 Remote SQL Injection # ######################################## #[~] Author : **RoAd_KiLlEr** #[~] Greetz : Ton![W]indowS,KHG,ALBOZ-CREW,B3r0-G & All … | |
Hi People I need to compare a particular line in a file with a particular string in the other file. I am attaching both the files for your reference. here is my code: [CODE] open (INFILE, "$input") or die "Couldn't open $input for reading: $!\n"; while(<INFILE>) { my $line= $_; … | |
I'm pretty new at this, and I'm trying to figure out how Perl's classes work with signals. Specifically, it doesn't seem that a class's DESTROY function is called when you Ctrl-C the program. I tried using [INLINECODE]use sigtrap qw(handler DESTROY INT QUIT);[/INLINECODE], but I'm not even sure this is the … | |
Hi, I'm using following packages to read and write the excel, But the problem I'm not able to copy the formula from one sheet to other sheet packages are use Spreadsheet::ParseExcel; use Spreadsheet::WriteExcel; Is there any other packages so that I can copy excel fromula to another excel ( I … | |
Hi ! Sorry for my english ! My script must rename file name, but don't do it. What is wrong with this script: [CODE]@rem = '--*-Perl-*-- @echo off if "%OS%" == "Windows_NT" goto WinNT perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl :WinNT … | |
HI, I have a string like this. These are the set of phrases enclosed in double quotes: [code] $str="\"rna binding protein\" OR \"Transcription factor\" "; [/code] I want to replace the string like this: [code] $str="\"rna|(rna) binding protein\" OR \"Transcription|(Transcription) factor\" "; [/code] How can i replace the above string … | |
Hi, I wan't to add simple web form to my page. name, e-mail, comment, so I started poking around internet and found out about CGI. I put premade cgi.(pearl) script in cgi-bin folder on server and adjusted form for that script: When I tested out my form , i got … | |
I need to read from a file and be able to split it into columns and ignore a line if it starts with ' . '. the text file is made of 3 columns but at some lines there are no words in the first column here is an example … | |
Hi, I am trying to match phone numbers, and want only having format xxx-xxxx. Here is what i have written so far : [CODE]sub OfficePhoneNumber { my @numbers = @_; my $number; my @results; foreach $number (@numbers) { if ($number =~ m/(^\d{3}-\d{4}$)/) { push @results, $number; } } return @results; … | |
I want to search "The tree is in the yard" for the word "the", then replace the word "the" with "<font color=#FFFFFF>the</font>", which I currently do with "s/$searchstring/<font color=#FFFFFF>$searchstring</font>/gi;" BUT I want to preserve the case of the word, so that in this example the first word of the sentence … | |
Hello, I have created a simple webservice and I am now in the testing mode. I am trying to write a simple script that will use curl to create user accounts and another one to delete user accounts. I have tried to use system to send curl commands [CODE=perl] my … | |
basically i need to have 2 variables.. concat them and put them into use. here is what i have done so far: [code] #!/usr/bin/perl $stats = ':/var/tmp/RtcTestHarness/currentTransactionStats.txt'; $console = ':/var/tmp/RtcTestHarness/TestHarnessConsole.log'; $client_1 = '9.34.120.36'; #$com = $client_1.$stats; #print $com; the concat here looks fine... system ("scp $client_1.$currentTranStats ."); [/code] anything wrong? … | |
<?php session_start(); //Check User Session include ("includes/check_session.php"); include 'includes/config.php'; $current_module = 'MATERIALREQ'; //$related_modules = array('BIDDINGENTRY','PIRRAISING','POLIST','BIDDINGSELECTION','GRV'); include ('includes/check_acl.php'); //include 'includes/config.php'; include 'includes/sqlquery.php'; include 'includes/message.php'; $valid = ''; $current_user_id = $_SESSION['associate_id']; //if the session value is present, set whether the last transaction is stored or not if (isset($_SESSION['mrmsg']) && ($_SESSION['mrmsg']!='')) { $valid … | |
Hi everyone, I am using this code to parse data from latex files : [CODE] #!/Applications/xampp/xamppfiles/bin/perl use strict; use File::Copy; use LaTex::Parser; use Text::CSV_XS; use utf8; use Unicode::String; Unicode::String->stringify_as( 'utf8' ); # utf8 already is the default #see Ch 7.1 of Data Munging with Perl my $output = "ID+add.txt"; open … | |
I'm using mod_perl it seems I have to restart apache every time I modify one of my modules. is there a way around this so that the modified module will load without restarting apache? | |
I have a .cgi file that reads POSTed data from an HTML questionnaire Form and displays HTML that lists all the scholarships the person may qualify for. I want to Include a file with CSS and a Header image. Unfortunately none of this is taking effect, only the list of … | |
Using Visual Basic .Net, explain what each variable type listed below holds, how big it is (i.e. the number of bytes it uses) and give an example of how it might be used. Data Type Explanation space occupied Example Text Integer Floating point Byte Date Boolean | |
I have a list like this: name1: group1 name2: group4 name3: group1 group2 name4: group4 .......... .......... I wish to invert this list, and make it look like: group1: name1 name3... group2: name3 group4: name2, name4 ........... ........... Can somebody offer at least a psuedo code? Thanks | |
I am a perl beginner and need some help with regex Input for this code is : aatgatgataaggtaaggtatgatgatgatgatgatagtagannnnnnnnnatgcatga'/atgca.atgactagca/atgactagcaaggtaaggtaaggtaaggtaaggtatgatgatgannnn./atgatgactagactgacaaggtaaggtaaggtatgatgatgatcgatgacgat... and so on Here i am trying to assign input file as a scalar variable and trying to find a match of "aaggtaaggt" and then skip some 100 characters whether they are … | |
Hi All Im very new to perl scripting coming from a shell background, but im determine to stick to it and learn perl. I have env variables which i have defined in my perl script and work fine from command line as these env variables are in my profile. When … | |
I'm new to perl and I'm writing a script to parse multiple Gaussian03 output files and extract certain pieces of data from them. Ideally the script needs to print out the name of each file, look for (the last) SCF Energy, the Zero-point Energy and check if the job has … | |
there are so many here: search.cpan.org/search?query=upload&mode=module which one do you use? | |
Hello :-)! I installed Ubuntu in order to install CMU Sphinx ([url]http://www.speech.cs.cmu.edu/sphinx/tutorial.html[/url]). There is one problem with executing perl script and I think it is good place to ask for help. Script make_feats.pl is here [url]http://www.linuxforums.org/forum/attachments/debian-linux-help/2267d1256986736-kde-startx-debian-make_feats.pl.txt[/url] . When I run "perl scripts_pl/make_feats.pl -ctl etc/an4_train.fileids" I see "Configuration (e.g. etc/sphinx_train.cfg) not … | |
Hi everyone Well I have been trying to install some modules like Bundle::DBI, DBD ::mysql and latex::Parser on my apple comp running mac OS X operating system. Every time I am trying to install a module I get an error like this : make had returned bad status, install seems … | |
basically i am trying to search for similar strings in an array which is hardcoded into the script and compare them to and find the line they exist on the text file here is my code so far [CODE=perl] #!/usr/bin/perl %fruit=(banana=>1,apple=>2,orange=>5); $target = %fruit; open(INPUT, "<fruits.txt"); while (<INPUT>) { if … | |
Hi, I have strings like this: [code] $string="OWN - NLM STAT- Publisher DA - 20091005 AU - Gannon AM AU - Turner EC AU - Reid HM AU - Kinsella BT AU- XYZ AD - UCD School of Biomolecular and Biomedical Sciences"; [/code] I want to parse these tags and … | |
Hallo everyone im starting to learn perl and i have a problem , i have an exercise asking me to count all the letters each apart in a DNA string , for example my @DNA =( ctagctagcatgacgatacatgacagataggatacagatagacagatacagatacagatacagatagacccatgacagatac) so i have to make a perl script showing the user how many … | |
Hi all, I am a perl newbie. I am using a perl code to read a column full of data from 1 field into an array [CODE]for(my $i=2;$i<table->last_record;$i++) my @data = $table->get_record($i,"Date"); [/CODE] Now for example if my @data[1] consists of list of numbers, I need to find the diff … |
The End.