$q = durham-region;
$q = ucfirst($q);
$q = Durham-region;
Run Code Online (Sandbox Code Playgroud)
在破折号(达勒姆地区)之后,我如何将这封信大写?我是否必须将两者分开并大写?
似乎找不到我要找的答案.
我想在表格中创建2010-11-01到2015-01-01的一系列日期.
2010-11-01 2010-11-02 2010-11-03等...
列数据类型为'Date'
谢谢
我是一个perl noob,我用Google搜索了错误,找不到任何相关内容.
#!/usr/bin/perl
use strict;
my %cc;
\my @cc => (3,4,5,6,6,7,7);
$cc{key} = \@cc;
$0 = $cc{key}[0] * 2;
$1 = $cc{key}[1] * 1; #error here
my $total = $0 + $1;
print "$1";
print "$total";
Run Code Online (Sandbox Code Playgroud)
第11行是我的错误......
奇怪的是,我一定是在遗漏一些东西.
$city = "vancouver";
$insert1 = "https://www.site.ca/buy/vancouver/28130965/";
$url2 = str_replace('/$city/','index.php?deal=',$insert1);
Run Code Online (Sandbox Code Playgroud)
我试图从PHP扩展.这是我遇到的一个基本问题,无法弄明白......
password.pl
#!/usr/bin/perl
use CGI;
$q = new CGI;
print "Content-type:text/html\r\n\r\n";
print '<html>';
print '<head>';
print '<title>Card</title>';
print '</head>';
print '<body>';
print '<FORM METHOD=POST ACTION=/card.pl>';
print '<INPUT TYPE=password NAME=password SIZE=25>';
print '<input type=submit value=Submit>';
print '</FORM>';
print '</body>';
print '</html>';
1;
Run Code Online (Sandbox Code Playgroud)
card.pl
#!/usr/bin/perl
use CGI;
$q = new CGI;
$password = $q->param("password");
print $password;
if ($password == pass)
{
print 'Yup';
}
else
{
print 'Wrong Password';
}
1;
Run Code Online (Sandbox Code Playgroud)
什么都没有从password.pl表单传递给card.pl?我以前用过一个类似的例子没问题?
更多咖啡......
是否可以创建到终端设备上的开放端口的套接字连接.
如果连接丢失打印的东西?
我看过一些例子,但它们需要服务器类型脚本和客户端,只需要查找客户端.
谢谢
不知道为什么这不起作用?循环不喜欢我的变量吗?如果我硬编码这个工作......
while($row = mysql_fetch_array($resultno))
{
echo "<tr>";
echo "<td><a href=reportip.php?prov=&date1=$date1&starthour=$hour1&endhour=$hour2&prov=$prov&date2=$date2&$hour2&$prov=13&lookup=" . $row['$radio'] . ">" . $row['$radio'] . "</a></td>";
echo "<td>" . $row['count'] . "</td>";
echo "</tr>";
}
Run Code Online (Sandbox Code Playgroud) 不是最好的方法... preg_match或rtrim.无法工作......
$insert = http://www.site.com/buy/vancouver/house
$insert = rtrim("$insert", "/buy");
Run Code Online (Sandbox Code Playgroud)
没变.
谢谢您的帮助.
好像我每天的路障.这可能吗?qw中的字符串?
#!/usr/bin/perl
use strict;
use warnings;
print "Enter Your Number\n";
my $usercc = <>;
##split number
$usercc =~ s/(\w)(?=\w)/$1 /g;
print $usercc;
## string in qw, hmm..
my @ccnumber = qw($usercc);
Run Code Online (Sandbox Code Playgroud)
我得到参数"$ usercc"在乘法(*)中不是数字
谢谢
是否有可能将这些组合在一条线上,以便更加高效.
awk '$4 ~/^[x]/' raw.txt > x_raw.txt
awk '!/y/' x_raw.txt > xy_raw.txt
Run Code Online (Sandbox Code Playgroud)
这可能与perl有关吗?
我相信我有这样的正确.我可以打印变量没问题.通过vriables到ups检查脚本什么都没发生?
#!/usr/bin/perl
open FILE, "upslist.txt";
while ($line=<FILE>){
if ($line=~/^(.*?),(.*?)$/){
#print "ups:$1 string:$2\n";
do 'check_snmp_mgeups-0.1.pl -H $1 -C $2';
}
}
Run Code Online (Sandbox Code Playgroud)
upslist.txt
#ups
ups1.site,upsstring1
ups2.site,upsstring1
ups3.site,upsstring2
ups4.site,upsstring3
Run Code Online (Sandbox Code Playgroud)
谢谢您的帮助.