2,059 Topics

Member Avatar for
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
136
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
240
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
313
Member Avatar for weasel7711

Running Ubuntu Intrepid. Installed Dansguardian recently. When I try to start or restart dansguardian, I get the following error: [CODE]micah@micah-ubulaptop:~$ dansguardian Unable to getgrnam(): Success[/CODE] I know this has something to do with the group in my dansguardian.conf file. The only thing I can see that relates to that is …

Member Avatar for dipinkrishna
0
455
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
155
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
133
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
183
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
938
Member Avatar for ubuntuubuntu

Hello, I have a program, let's say foo.cpp . If I do "g++ -S foo.cpp". That generates the file "foo.S" with assembly code. I would like to compare the assembly code foo.S with the assembly code generated if I put foo.S in a c program (even though there should be …

Member Avatar for gerard4143
0
388
Member Avatar for Member #622241

a little introduction of my self :) Name: Hamzalija (mostly known as hami) Nickname: Claw, meco or hmeco Height: 6'10'' Weight: 300 (give or take few love handles :P) Hair: black Eyes: Brown Location: DK (Denmark - Europe) Age: 23 Hobbies: running my business, world of warcraft (addict :P), software …

Member Avatar for quicktpgo
0
93
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
109
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
106
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
69
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
147
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
124
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
200
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
198
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
151
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
96
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
474
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
122
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
71
Member Avatar for j_limboo

Got stuck How to make $newUrl a hyperlink in a different html page new to php code [CODE] <?php if (!isset($_GET['p']) || empty($_GET['p'])) { $_GET['p']=0; } if (empty($_GET['q'])){ echo "What are you doing?"; } else { /* getting value from the search form creating a new variable*/ $ser = $_GET['q']; …

Member Avatar for j_limboo
0
286
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
41
Member Avatar for dougancil

I'm fairly new at writing perl scripts and was wondering if you can write a perl script on an html page for the submission of a form to a database. Any assistance would be greatly appreciated. Thank you Doug

Member Avatar for codejoust
0
114
Member Avatar for Gamer357

Hi everyone, For anyone interested, my real name is Phill. Could not use it though since there is already someone registered under that name. Like the title says, I am a knowledge gobbler. I like learning stuff about the software side of pc's. At the moment I'm learning html, javascript, …

Member Avatar for edhardy
0
157
Member Avatar for EddieC

With ElectricCommander 3.0 set to begin shipping this week, I caught up with Electric Cloud CEO Mike Maciag to better understand the build automation tool's new "preflight" capability. That's a feature that determines whether changes to code will integrate correctly with the main build before those changes are actually checked …

0
149
Member Avatar for EddieC

If you're part of a software development team that performs multiple daily builds, then you might replace the term "continuous integration" with "continuous build failure." A company called [url=http://electric-cloud.com/]Electric Cloud[/url] may offer a solution. The software production tools maker later this month will begin shipping ElectricCommander 3.0, the latest version …

Member Avatar for EddieC
0
319
Member Avatar for Mushy-pea

I invented an encryption algorhythm today and used it to "hide" the information in an unused password I came up with. This was done on paper, not with a program. However, I am planning to start laying some code down for this today (in Haskell, partly as an exercise to …

Member Avatar for Michael_Knight
0
139
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
80
Member Avatar for John A

According to Linux.com, A few librarians working at the The Georgia Public Library have now created a new Linux-based system for content management and organization for large-scale library operations. Evergreen, the name of the system was written in a mixture of languages, including C, Perl, and Javascript, and is open …

Member Avatar for obamamahma
0
198
Member Avatar for happygeek

Google Labs has launched a new search engine just for you, software developers that is. [URL="http://google.com/codesearch"]Google Code Search [/URL] can help all programmers by quickly filtering billions of lines of source code, all from the default and familiar search interface, to reveal reusable code-snippets. Be it a specific programming term …

Member Avatar for happygeek
0
159
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
695
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
241
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
190
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
431
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
221
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
197
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
300
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
186
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
310
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
911
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
176
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
106
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
217
Member Avatar for skelly16

Hi Im writing a script where im using the date command in this format. [Datestart=`date '+%m/%d/%Y':'%H:%M:%S'`] Is their a way to force the date variable above to go back 5minutes?? I know their is a way in perl but i prefer writing this script in ksh

Member Avatar for Salem
0
143
Member Avatar for Member #126942

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
84
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
169

The End.