2,452 Topics
| |
I am passing a variable that needs to be evaluated with a print command. An example of my variable may look like this "variabl%e" I understand that the best way to get around the percent problem would be to simply add another percent sign to the variable and then it … | |
What is the difference between [ICODE]qq{}[/ICODE] and [ICODE]q{}[/ICODE]? I am learning some basic perl for class, and I noticed that [ICODE]qq{Element contents: $_}[/ICODE][ICODE]q{Element contents: $_}[/ICODE] produce different results in a loop... I thought "q{}" was like quoted or something.. What is it really? And what is qq{}? | |
Ok, so I have exhausted all possible options with this. I cannot figure out why this script fails to compile when trying to divide. The division on line 203 seems to break the whole script. The errors that are displayed are for lines that are 50 some lines below the … | |
Hi I have a search function where the user selects from drop down boxes. There are 4 fields to choose from and any of the 15 combinations can be used to search with. I am using Else If and the very first IF works, but when it is false it … | |
Hi everyone, I am trying to idetify the position between start_posi and end_posi and I want to have all information of this position. For Example: [CODE]input 1 : num start end 1 1234 1238 [/CODE] [CODE]input 2 : num position information 1 1236 ACGT [/CODE] [CODE]out put 1234 1236 1238 … | |
Hi, I was wondering if Perl has a command line interpreter like Python's IDLE, where you can test things readily without having to save them as a program and run them. If not, why? Why is it that Python or Matlab has command line interpreters where you can type 4+3 … | |
I would like to write Perl script to read just first line of a file & calculate the length of second field which is comma separator file. For example - 1001,abcd,9999 1002,xyz,0001 expecting result - 4 (character length of second field from just first line i.e. abcd) Can somebody help … | |
I have tried this code but its not working....what I want is that when I click on "Available" hyperlink a popup form should be opened. I have copied the code below <? if($GotPro['available']==1) { echo ($GotPro['PropertyName'].":". '<a href="#" ><script type="text/javascript">window.open(<a href="checkavailability.php" ></a>)</script>Available</a>'); } else if($GotPro['available']==0) { echo ($GotPro['PropertyName'].":". '<a href="#" … | |
Basically I am reformatting a list that looks like this ko10101 K01392 K09134 ko34231 K05789 ko13452 K04665 K07881 into a csv file that looks like this: ko10101\tK01392 ko10101\tK01392 ko10101\tK09134 ko34231\tK05789 ko13452\tK04665 ko13452\tK07881 [code]while (<OUT>) { my $line = $_; chomp; if ($line =~ /^$/) { next; } elsif ($line =~ … | |
Hi, I need some help regarding on my laptop. Samsung R530 dual core T4400 2.20GHZ it is pre installed windows7 home basic...when i formatted it and install fresh window7 ultimate.After the installation finished when it loads to the desktop there is an error saying that hardisk problem...so i tried reformat … | |
Hello, I've searched far and wide for an answer to a question that I have, but did not find anything that could help me achieve what I would like to do. I have a delimited text file (CSV) with fields that resemble these below that repeats/resemble 18 times (I only … | |
Hello. I have a severe problem with open(). Here is my actual code. [ICODE] #!/usr/bin/perl $file = '/testerpage.php'; # Name the file open(INFO, $file); # Open the file @lines = <INFO>; # Read it into an array close(INFO); # Close the file print @lines; # Print the array <>; [/ICODE] … | |
OK.. so this is probably basic but, I can't seem to wrap my head around it. The URL is like this.. [url]http://Whatever.com?id=ThisID&title=AncorText[/url] So.. I'm trying to use.. [CODE]<?php $id = $_GET['id']; $title = $_GET['title']; echo $id; echo $title; ?>[/CODE] .. to place the variable parameters into a hyperlinked URL on … | |
I have a problem with MDI forms and their location. I have a container form within which I open several child forms. Also note that in the container form I have a ToolStrip at the top and it is also docked to the top. In each of the child forms … | |
Hi, I want to use the macro "ITIMER_REAL" in my perl script. But using this is giving me error as "Your vendor has not defined Time::HiRes macro ITIMER_REAL, used at test.pl line 15." Can anyone help me out in finding the reason. Thanks, Parul | |
I am using Mac OS X with the built in configuration of Apache. I am taking a web dev class where we're writing perl scripts ... so far I've been able to get my CGI scripts to run via mod_perl. Now, I'm trying to install CGI::Session via CPAN and it's … | |
I'm just learning PERL. I'm working on a short practice data set. All I want to do is to see if A) all values from a list exist in a hash i've made from a separate data file, and B) are the values that do exist defined--i.e. have a value … | |
I have the following hashed structure [CODE]$chainStorage{$R1}{$S1}{$C1}{@A1}[/CODE] [QUOTE]$chainStorage = { 'ACB' => { 'E' => '06' => [100, 200, 95] 'B' => '23' => [20, 1000, 05, 30] }, 'AFG' => { 'C' => '24' => [18, 23, 2300, 3456] }, 'HJK' => { 'A' => '12' => [24, 25, … | |
Hi, I've been trying to learn how to do collision between a sprite and a tile for a while, so I've been testing this point collision I found from a Java book. But for some reason, the tile's images can't be drawn onto the screen. Any Ideas or thoughts to … | |
Hi everyone, thanks for reading this. I am trying to write some code so that a vote button won't allow a person to vote unless they are registered and logged in. I have this written, but it's not outputting properly. I'm pretty sure I am not encoding the URLS properly … | |
Hey guys I'm stuck. I have been trying to write a sed or perl script to change the below. But each time I run the sed script or perl it completely zeros out the file. I want to change this [B]/opt/dragon/bin/runit[/B] to this [B]cd /opt/dragon/bin; /opt/dragon/bin/runit[/B] #!/bin/bash for fl in … | |
Hi, I have a weird problem in my asp.net project. On search page I have repeater. Inside repeater I have a link for reservation for each item. When I come on page first time, it works well. But when I change some of options in repeaters's data source - for … | |
i have a file of the form [CODE](9430, 3656) (9147, 14355) (133, 14393) (7917, 9513) (3719, 12775)[/CODE] lets say i need to store it as a hash.such that 9430=>3656 and so on.I tried using split but it takes whitespaces for right hand values.How can i do it the better way? | |
I have a hash %d,i want the top five valued keys.I did the following wich worked but is there anything more effecient? [ICODE]@p=(reverse sort{$d{$a}<=>$d{$b}} keys%d)[0..4];[/ICODE] | |
Can someone help me on perl script for "how to sort flat file on third field & stored sorted output in the output flat file"? In this example - I have input file with unique key column (third field)& I want sorted output get stored in the output file. e.g. … | |
for multiple scroll_list I used code below. [CODE]print scrolling_list(-name=>'services', -values=>\@field3, -multiple=>'true', -size=>25);[/CODE] How can I fix for a maximum of 3 selects since I have more than 50 scrolls. | |
Hello people! I have a question. I use windows xp operating system and ms office professional 2007. When I want to import a tif file in Excel 2007 as a hyperlink from Hyperlink button, I succed import the tif file, but when I double click on the link it occurs … | |
hi! can someone help debug my codes? getline() works properly in my main() but if i'm putting it to another function, it ignores the first getline() w/o entering any words and goes to the 2nd getline. my program works like this: i have a menu() that lets the user to … | |
Hi Perl guru's I'm new on Perl i need help for below mentioned issue. I have 4 flat files with 4 columns like below: eg: 000360112720C17506721111130602 m 1L 1008968860482 I have one excel file with 12 columns I have converted the excel file into text with comma seperated. Now i … | |
Hello, Can you please help me in following scenario in Perl scripting? I want to compare two text files & save output of this comparision in third file with flags I-Insert, D-Delete, U-Update at the end of line. File1.txt - 1|abc 2|efg 3|xyz File2.txt 1|abc 2|efh 4|pqr Expected output is … |
The End.