1,633 Topics

Member Avatar for
Member Avatar for ajay_p5

Hello friends , I need to parse some data from a file and arrange it in a certain file..however the file is so confusing and has such minute issues that it has really confused me now..can sumbody help. Thanks Aj I am attaching the main part of the input file …

Member Avatar for d5e5
0
174
Member Avatar for Honkey_Magoo

I have created the code to connect to a MySQL database and retrieve the values of a table. This is the function for printing the table: [CODE] # Name: dbHistory # Purpose: prints srvHistory table from database # Parameters: N/A # Returns: N/A # This is the implementation of the …

0
100
Member Avatar for santhanalakshmi

Hi, This is my perl program.......... [CODE]#!c:/perl/bin/perl use CGI qw(:all); $pfaccode=param('faccode'); $pprogramme=param('programme'); $pdeptcode=param('deptcode'); $pbrancode=param('brancode'); $psemester=param('semester'); $pkook = cookie(-name=>'logtime'); print "Content-type: text/html\n\n"; print "<body bgcolor=\"#ffcccc\">"; use DBI; my $dbh = DBI->connect("DBI:ODBC:wwwdsn","webid","dibew") or die "Cant connect: $DBI::errstr\n"; my $sth = $dbh->prepare("select kid from facltmst where faccode = ?") or die "Can not …

0
68
Member Avatar for mf44

Hello! Good morning. I am a newbie to perl. Sorry for the "stupid" question. Need your help on a perl one liner. Can't figure out how to add into the line. Currently have the following line: perl -pi -e 's='\{"$Poly_Map"=\{"$Poly_Map"F= temp_list This to search something like: A1_0 {A1_0 size by …

0
40
Member Avatar for ajay_p5

Helllo all, well I am trying to split a file on the basis of space first and then trying to join it with "-" but i am not able to do it, can sumone please suggest what should I do in order to do it. I am attaching the required …

Member Avatar for ajay_p5
0
124
Member Avatar for jacquelinek

I have a txt file as an input. It is a list which looks like this: [COLOR="Red"]A12345 B153875 C34893 ... ...[/COLOR] and I have a database file which looks like this: [COLOR="Green"]A12345 detail information nvonafwenfovosdncsjdnfoewhuwerhwieufhiudhfisdfnsd sdofnowerugfeuhgfurhgiuwerhfjdshfiasdhifheruwufhi irgfiweurgf A246 detail information isdofnowerugfeuhgfurhgiuwerhfjdshfiadhifheruwufhi wgerjgneiguihuhdnvkjdnvkjbdegiauberiubgieubgridfb ooogrngoawerngiauengugbuivrug B153875 detail information wgerjgneiguihuvkwwjddnvkegtiaugberijubgieubgridfb eragnowergnoweungfiousdhiuhsdnjkfnsk C34893 detail …

Member Avatar for d5e5
0
159
Member Avatar for ajay_p5

Hi, Well I am getting this warning while running my script which is attached:Use of uninitialized value in concatenation (.) or string at aj.pl in this line : print OUTFILE"$address[$k]|" as when i remove this line I don't get any warnings: Can someone please tell me what is wrong with …

Member Avatar for ajay_p5
0
184
Member Avatar for orwell84

Well, I want to have a program make a graph from the data that it has, so I looked up how to do that in Perl. The GD::Graph module came up. The problem is, that I tried installing GD previously and it did not work. I have tried every trick …

Member Avatar for ItecKid
-1
141
Member Avatar for horakova

This is actually a CGI issue I am having but Perl seems to be the closest forum here. I am having a very simple (hence very frustrating) problem with a CGI/Perl script. For some reason if I pas things from a checkbox they all get passed fine but the last …

0
123
Member Avatar for rdevi

Hi all ! Can anybody tell me why the following code is not copying the file from source to destination? Thakns in advance........ use File::Copy; my $source="C:\\shared\\8.4.1\\DXSI"; my $dest="C:\\r45"; my @files; my $file; opendir(DIR, $source) or die "can't opendir $source: $! \n"; @files=readdir(DIR); close DIR; foreach $file(@files) { print "\n …

Member Avatar for rdevi
0
158
Member Avatar for axn

I am migrating scripts from UNIX server to a Linux. In the perl script it calls rcp to transfer files. It worked ok in UNIX but not in Linux, which has scp, I dont want to do scp now as this is a temporary Linux Box I am using. I …

Member Avatar for axn
0
899
Member Avatar for ragsnayak

Hi, I'm a newbie in Perl programming. I have to start/stop the Windows services running on the remote machine. So, I’m writing a script in Perl to accomplish this job. So far, I’ have completed the following tasks. • to access the windows services through Perl in my local machine. …

Member Avatar for mitchems
-1
98
Member Avatar for jen140

Hello all. I was trying to execute wget from the perl under windows vista. In cmd i can easily run wget because its in \windows\system32 folder. But from perl,when i try both system('wget --h'); and system('c:\windows\system32\wget --h'); i get the next error : 'wget' is not recognized as an internal …

Member Avatar for jen140
-1
90
Member Avatar for rdevi

Hi all, Can anybody tell me, how to coy a directory along with its contents from remote machine to my local location? Both the machines are windows only. Thanks in advance.

0
61
Member Avatar for rdevi

Hi all, I am new to Perl. I am trying to send a variable which contains the location of my executable (eg: C:\temp) to system function. i initialized the variable as, my var1="C:\\temp"; when i print this line i got : C:\temp as o/p. To start the executable i did: …

Member Avatar for rdevi
0
130
Member Avatar for sready

I have a program that outputs bugs fixed on given dates. I am going to graph this in excel, but I want to center the graph at the release date so I can see the change of bugs fixed before release and after. To do this, I need the x-axis …

Member Avatar for Reiner Dieden
0
107
Member Avatar for jacquelinek

A protein entry on swissprot database be something like this: ID ATF6A_HUMAN AC P18850; O15139; Q5VW62; Q6IPB5; Q9UEC9; DT 01-NOV-1990, integrated into UniProtKB/Swiss-Prot. DE AltName: Full=Activating transcription factor 6 alpha; DE Short=ATF6-alpha; OS Homo sapiens (Human). RN [10] RP REVIEW. RX MEDLINE=21376119; PubMed=11483355; DOI=10.1016/S0378-1119(01)00551-0; RA Hai T., Hartman M.G.; RT …

Member Avatar for Reiner Dieden
0
177
Member Avatar for inquisitor71

Could you suggest how to prevent the following script from reloading when 'Submit' is pressed ? Thanks [code=perl] #!/usr/bin/perl use strict; use warnings; use CGI qw(:standard :html3); our @results; #require ("file_upload2.pl"); print header; start_html(' questions shuffle'), print h2 ("\t questions shuffle"); my @questionsets = ("dt_questions.txt", "questions2.txt", "dt_questions.txt"); foreach my $setfile …

Member Avatar for wickedxter
-1
179
Member Avatar for terrylau77

I've got a text file in this following format : Field Data 1 2 1 3 1 4 2 5 2 6 3 2 3 3 3 4 I would like to open separate windows for each of the field... meaning : window1 (for field1) will display 2,3,4 window2 (for …

Member Avatar for wickedxter
-1
144
Member Avatar for piers

Hi I am struggling learning perl and everytime I try to enter stuff in at runtime I keep getting a 1 returned. I dont get it. please can you explain to me what I am doing wrong. #!/usr/bin/perl print "content-type: text/html \n\n"; &fname; print "\n totals are out of 140 …

Member Avatar for katharnakh
-1
81
Member Avatar for KevinADC

Code snippet to generate random passwords. Avoids using confusing characters such as lower case L (l) and the number one (1), the letter 'O' and the number zero. Upper-case alpha characters could be added to the character set if mixed-case passwords are desired.

Member Avatar for Prakash_8111
-1
421
Member Avatar for Prakash_8111

Hi Guys, Can any one suggest to generate a random number of eight digit. All suggestions are welcomed :)

Member Avatar for KevinADC
-1
109
Member Avatar for piers

I am trying to teach myself perl and I cannot understand why when I print arrays from these subroutines that it prints an extra one that isnt there. @name=fname(@name)."\n".lname(@name); print @name; sub fname(@name) { @name=('john'."\t",'james'."\t",'edward'."\n"); print @name; } sub lname(@name) { @name=('hunt'." \t",'jones'."\t",'smith'); print @name; } this is what I …

Member Avatar for dweebsonduty
-1
64
Member Avatar for siragnas

Please let me know how this will execute in perl: ($a,$b)=((1,2),3); Print $a $b what will be printed as output?

Member Avatar for Salem
-1
29
Member Avatar for Mushy-pea

Hello everyone and welcome to the next episode of Mushy-pea's blog. This entry is about my favourite language (except English of course) Perl. If you're a regular Perl user you might already know this; the developers of Perl 6 are using a prototype version of the Perl 6 interpreter written …

0
57
Member Avatar for KevinADC

This code snippet will produce strings of numbers (1 thru 49) with no repeated numbers in the same string and no duplicated string of numbers in the list of strings. To change the range of numbers the script generates change 49 in the code to your requirements. Please feel free …

Member Avatar for KevinADC
0
629
Member Avatar for Kelicula

Ever had to fix auto-generated dates retrieved from MySql databases? I made a really quick fix that displays the date in "human readable" format. Just replace "CST" with GMT, or EST etc... Whatever time zone your mysql server is located. it takes one argument, the date from the database. [B]Usage:[/B] …

Member Avatar for Kelicula
0
216
Member Avatar for Kelicula

[B]Situation:[/B] Ever wanted to get the size of an image? Possibly to determine new height and width dimensions that DO NOT distort the proportion. Well I have, and I overcame the math like so. [B]Solution:[/B] First you must decide on an image width. The subroutine returns the proportional height equivalent. …

Member Avatar for Kelicula
0
164
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
387
Member Avatar for kalyanraj

The End.