473,549 Members | 2,627 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Perl Forum

Perl programming language - ask questions about perl programming, syntax, variables, scoping, constructs, operators and functions, files, I/O, regular expressions, regex, subroutines, OO (object oriented), perl modules, CGI and more.
0
3,854
thread by: p1qb0d | last post May 26 '16 by: p1qb0d
Hello. I'm trying to work with Cisco hardware. Simple script read the config: #!/usr/bin/perl use strict; use warnings;
1
3,009
thread by: akhilciba | last post Sep 17 '16 by: RonB
Hai i have a tab limited file (see the attachment 1.xls) and i want to extract only 2,7,8 columns(2.xls) how it possible with a perl code
1
3,390
thread by: akhilciba | last post Sep 17 '16 by: RonB
hai wrote a code for doing BLAST as follows #!/usr/local/bin/perl use strict; use warnings; # Usage information die "Usage: $0 <input_fasata> <gene_lenght> <output_file>\n", if (@ARGV != 3); my ($infile,$ln,$outfile) = @ARGV; print "running BLAST ..."; system("blastall -p blastn -d aa.fna -i $infile -o blastout -m8");
4
3,631
thread by: akhilciba | last post Sep 20 '16 by: RonB
Hai there i have a perl code as follows open(DATA1,'blastout'); while(<DATA1>) { my @data = split /\t/,$_; print "@data\n" if $data>=$ln; }
1
4,742
thread by: sharve | last post Oct 4 '16 by: RonB
Hello, I am trying to use perl to run two different commands - both of which need to be executed in a separate command prompt. Here are some of the details: when I run system('start cmd /k "cd c:\PerlExamples && perl Perl_Ex_1.pl"');
1
3,580
thread by: jhulan | last post Oct 20 '16 by: RonB
Inputfile.txt is given file and output.txt is expected output in attachment. In this situation we have to deal with nested case statements, which you can observe by seeing the input file and output given in attachment. I got the output for one level nested case statement. first I saved the content between first "case" and last "esac" in a temp...
2
4,103
thread by: Roamer | last post Nov 9 '16 by: Roamer
Normally I'm okay writing files, but this is something I have never tried before and am not getting the correct result in the new file. A file contains some text with a header. I can grab the header okay. What I want to do is write the entire rest of the file to a new one. The problem is, it only writes the last line to the new file. Text...
1
4,250
thread by: mlr214 | last post Jan 27 '17 by: RonB
I am very new to perl programming and need help: I have a spreadsheet with multiple columns and I am interested in extracting data from just 3 columns. Column A has gene names Column B has a sample id Column C has a characteristic of the sample. I want for each unique value in column A to print the sample IDs (columnB) that match that...
0
4,532
thread by: Dinesh12 | last post Feb 6 '17 by: Dinesh12
Hi, I am using perl. I have generated my 2d array datas using formy loop from A4 to D4. I want that datas from N4 to T4. #!usr/local/bin/perl print("Enter the no of corners:"); $corners=<STDIN>; use Spreadsheet::WriteExcel;
0
4,302
thread by: finddata15 | last post Feb 27 '17 by: finddata15
How do I copy particular extension files recursively and store it in same folder structure? use strict; use warnings; my $pwd = "/home/ra/DEMO"; my $destination = "/home/ra/output"; opendir(DIR, "$pwd") or die "Error";
3
13,079
thread by: gemstone | last post Mar 6 '17 by: mhalwi
hi guys, i wanna copy a directory with all its sub directories, to another directory. pls help. its urgent. i even tried xcopy, but in vain
1
4,831
thread by: Roamer | last post Apr 19 '17 by: Roamer
On blogs, you have an RSS Feed. In the heading of the page (usually the homepage) there is this: <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://anydomain.com/somekindofname.xml"> Note: there is no way of knowing the exact name of the feed, from the site url alone. It has to be found. Using Perl
1
4,517
thread by: 15mis1066 | last post Apr 29 '17 by: RonB
Consider that there are two arrays A and B each of size 10. Array ‘A’ contains numbers with multiples of 5 of any range. Array ‘B’ contains numbers with multiples of 3 of any range. Write a PERL code to perform and display the following.  Add the numbers of Array ‘A’ and Array ‘B’ in each position and check whether the sum is a prime number or...
0
4,473
thread by: virtualweb | last post May 4 '17 by: virtualweb
Hi everybody, I'm creating a website with HTML / Javascript embeded in perl code. I use perl to get values from a MySQL database which I need to feed a chart created with the javascript code so the chart can be updated on the fly. Everything works perfectly well except I don't know how the perl variable values can be passed to the javascript...
0
4,440
thread by: nikkefrend | last post May 24 '17 by: nikkefrend
Hello i need some help with a script i am working on i have a mailserver and all users accounts are stored in a MySQL database. I need to have a perl script that will take the user input and run the following database commands. INSERT INTO domains (domain) VALUES ('example.com'); INSERT INTO users (email, password) VALUES...
0
4,518
thread by: Kush | last post Jul 7 '17 by: Kush
use strict; use warnings; use feature qw( say ); my @aa = ("A", "C", "D", "E", "F", "G", "H", "I", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "V", "W", "Y"); my $pair; for my $n1 (@aa) { for my $n2 (@aa) { $pair = $n1 . $n2;
0
6,021
thread by: Jyoteeprakash | last post Aug 24 '17 by: Jyoteeprakash
My Code Snippet. #!perl -w ############################################################################# #
2
4,948
thread by: NeetuG | last post Sep 14 '17 by: NeetuG
my $iv = '0000000000000000'; my $cipher = Crypt::CBC->new( -key => $key, -cipher => "Crypt::OpenSSL::AES", -iv => $iv, -literal_Key => 1, -header => 'none', -padding => 'default' );
4
6,099
thread by: Jatla V Ganesh | last post Sep 15 '17 by: Jatla V Ganesh
#!/usr/bin/perl use strict; use XML::Simple; use Data::Dumper; use File::stat; use Time::localtime; use POSIX (); use File::Basename; use File::Path qw(mkpath);
2
4,874
thread by: Roamer | last post Apr 10 '18 by: Roamer
Hi, I have a file which counts the actual visits to my site pages (not a hit counter). It works fine, but I have to manually wipe it each month. Is there an easy way (without modules) to zero out the file on the first day of the month 01 ($mday) only once! Which means it has to ignore the $mday of 01 after the first time. I can zero the file...
0
3,993
thread by: nileshjsr | last post May 30 '18 by: nileshjsr
I am new to Perl scripting and I have file contains File: input.log DATE1=2018-05-24 DATE=2018-05-20 SETTING USER RELATED INFORMATION .. SETTING USER RELATED INFORMATION .. Database Connection Information
1
3,893
thread by: Rajesh Anumula | last post Sep 1 '18 by: zmbd
se strict; use warnings; my $x = <STDIN>; foreach my $x ( sort glob('$x/*') ) { my($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat($x); printf("%-40s %8u bytes\n", $x, $size); }
0
3,863
thread by: adasss | last post Feb 22 '19 by: adasss
Hello, I need to write perl script to copy file on MS Sharepoint which needs SAML authentication. (OS: Windows 2003) The problem is with SAML authentication I ued LWP::UserAgent but it seems to not working correctly. Is there anyone that already has working Perl code to connect with SAML? Which library should I use ? Best Regards, Adam
0
3,605
thread by: callsaurabh | last post Jul 3 '19 by: callsaurabh
Hello , I need to download file from the server based on user inputs. Suppose user give the input Gabon and Core,the file name which should get downlaoded will be Gabon_Core.csv. I tried to create below code for the same but somehow it is not working.Any help will be highly appreciated. #!/usr/bin/perl use CGI ':standard'; use...
2
3,828
thread by: craigt | last post Feb 26 '20 by: craigt
Hey, I have a file loading CSS animation in a Perl/CGI module that looks and positions as hoped in Chrome, Edge, FF, IE, and Opera. But the animation does not work in any of the browsers. I've taken the same CSS and DIVs where the animation should appear and put that in an HTML module and the animation works as expected. Thinking there...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.