2012年4月12日

一个命令行交互脚本

摘要: 按q键退出,否则显示用户输入。#! /usr/local/bin/perl5use strict;use warnings;sub test { while (1) { # display the prompt print "sditest> "; # Get input form STDIN, this is short for my $get = <STDIN> chomp (my $get = <>); # Quit when user pressed 'q', otherwise print what ever... 阅读全文

posted @ 2012-04-12 09:59 perlman 阅读(631) 评论(0) 推荐(0) 编辑

导航