Project

General

Profile

Feature #1845 ยป smdelete_prompt.diff

regex on $ans - Canehan Xavier, 08/09/2011 10:21 AM

View differences:

smdelete (working copy)
75 75
		if ($opt{interactive}) {
76 76
			my $name = $row -> name;
77 77
			my $ans = prompt ("Really Delete $name [yes/no]", "no");
78
			if ($ans eq "yes") {
78
			if ($ans =~ /^y(es?)+$/i) {
79 79
				warn "Deleting ", Dumper (\{$row -> get_all}), "from table ",$opt{table};
80 80
				$row -> delete;
81 81
			}
    (1-1/1)