[急,在线等] asp转perl问题,懂两种语言的朋友请进。

FMBen 2005-05-02 03:37:46
asp 代码,作用,分离原来的一段如
/index.html
/here.html
/myfile/1.html

这样的代码,我不会perl的数组控制,希望有朋友能帮忙,解决即结贴.

sourcecode = Split(wording, chr(13), -1, 1)
numberoffiles=UBound(sourcecode)+1
for i = 0 to UBound(sourcecode)

sourcecode(i) = replace (sourcecode(i),chr(10),"") 'delete the space in path
sourcecode(i) = replace (sourcecode(i),chr(13),"") 'delete the enter in path sourcecode(i) = trim(sourcecode(i))

' format the wording
temp=left(sourcecode(i),1)
if temp<>"/" then sourcecode(i)="/" & sourcecode(i)
sourcecode(i)=replace(sourcecode(i),"/","$",1,1,1)
sourcecode(i)=replace(sourcecode(i),"$content/","$")
...全文
70 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhouyouben 2005-05-20
  • 打赏
  • 举报
回复
perl 处理字符就是厉害啊
FMBen 2005-05-20
  • 打赏
  • 举报
回复
看不是太明白。晕倒了。要。
我需要分离的是一行一行 chr(13) 在 Perl 中不知道是怎么表示呢。
Meteorlet 2005-05-02
  • 打赏
  • 举报
回复
while (<FILE>)
{
s!/!$!g; s!\$content!$!;
}

2,204

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 CGI
社区管理员
  • CGI社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧