The code by Kirsle (Programmer) works perfectly
for me. Thanks a lot.
Thanks a lot for all others as well specially for KevinADC as I found him very helpful all the time.
I have versy simple data like
1
2
5
6
2
8
9
10
1
3
200
50
3
2
1
Out of these I want to list each unique value and its frequency i.e how many time it is in the data
e.g
2 is found 3 time
50 is found 1 time
200 is found 1 time
The expected result should be like that
this is chain A
this is chain B
this is chain C
this is chain D
this is Chain F
but I am getting out put like this
this is chain A
this is chain A
this is chain B
this is chain B
this is chain B
this is chain B
this is chain C
this is chain D...
my code is as follow
open (SP, "myfile");
my $chains;
my @chains;
while(<SP>){
if ($_=~/^COMPND\s+\d+\sCHAIN:\s(.)/){
$chains=$1;
print "$chains";
}
}
the result print out
A K Y T C D E F values for...
I have a data like this
SEQRES 1 A 1522 U U U G U U G G A G A G U
SEQRES 2 A 1522 U U G A U C C U G G C U C
SEQRES 3 B 1522 A G G G U G A A C G C U G
SEQRES 4 B 1522 G C...
I want to extract the windows media player streaming from this URL
http://desimadesi.webhop.org/pak%20Channels/playmovies.php?mid=46
I can curl the whole page. But there is some problem with preg match statement
...// close curl resource, and free up system resources
curl_close($ch);
preg_match_all('/<div\s class=\'topmasters\' \s align=\'center\'>(.*?)<\/div>/",$output, $t);
$output=str_replace('/<div\s class=\'topmasters\' \s align=\'center\'>','',$t[0]);
echo $output;
?>
Please help to spot...
I want to display some of contents from my one website to an other one live.
I am planing using cURL for this job.
Here is my code for this task
<?php
// create a new curl resource
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL...
Dear barneyblackburn, Can you give a try to ASCII code instead of usin £ symbol if the problem persist?
I tried this
[code]
#!/usr/bin/perl -w
my $pound = "testing £ stuff here";
$pound =~ s/£/£/g;
print "FOO: $pound";
[/cod]
on my local suse 10.2 installation and it...
Dear All,
I am not saying any body to write the full script for me. Well I know that I can use notepad, kwrite, vi, etc for writing a php script.
I just want a start how to use IP redirection in PHP. I am new to PHP .
Otherwise please tell me some books/chapter to read for this.
Regards
Yes
I want to show different sites to people coming from different IP locations.
i.e different site/contents for users coming from Pakistan, UK, USA and Germany etc.
Regards
Thanks,
(/^ATOM\s+\S+\s+\S+\s+\S+\s+\S\s+(10|11|12|13|14|18|31|33|64|80|81|82|83|84|85|86|89|129|131|132|134|144|145)\s/)
can in the above line we pick values from 10,11,12, 13, 18 etc from an external file or from an array
i.e the external file could be a simple file containing these...
...or through command prompt and do not remains fixed as there are in this code.
use strict;
#open the directory and than read all the files with *.txt
use Cwd;
my $dir = cwd;
opendir(DIR,"$dir") or die "$!";
my @all_pdb_files = grep {/\.txt$/} readdir DIR;
close DIR;
#reterive desired...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.